]> granicus.if.org Git - apache/blobdiff - docs/manual/urlmapping.xml
Quote {Alias,Redirect,ScriptAlias}{,Match} arguments.
[apache] / docs / manual / urlmapping.xml
index 71cdad84d64936849998111d0c3fa01cad8be7b4..a59c568cc19560287ff0f57f5e5574eb9c58523e 100644 (file)
     module="mod_alias">Alias</directive> directive will map any part
     of the filesystem into the web space. For example, with</p>
 
-<highlight language="config">Alias /docs /var/web</highlight>
+    <highlight language="config">
+Alias "/docs" "/var/web"
+    </highlight>
 
     <p>the URL <code>http://www.example.com/docs/dir/file.html</code>
     will be served from <code>/var/web/dir/file.html</code>. The
     example,</p>
 
     <highlight language="config">
-    ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)   /home/$1/cgi-bin/$2
+ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)"   "/home/$1/cgi-bin/$2"
     </highlight>
 
     <p>will map a request to
     <code>AliasMatch</code> directive:</p>
 
     <highlight language="config">
-    AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$   /home/$1/public_html/$3
+AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$"   "/home/$1/public_html/$3"
     </highlight>
 </section>
 
     to request the content at the new location as follows:</p>
 
     <highlight language="config">
-    Redirect permanent /foo/   http://www.example.com/bar/
+Redirect permanent "/foo/"   "http://www.example.com/bar/"
     </highlight>
 
     <p>This will redirect any URL-Path starting in
     requests alone, use the following configuration:</p>
 
     <highlight language="config">
-    RedirectMatch permanent ^/$    http://www.example.com/startpage.html
+RedirectMatch permanent "^/$"    "http://www.example.com/startpage.html"
     </highlight>
 
     <p>Alternatively, to temporarily redirect all pages on one site
     to a particular page on another site, use the following:</p>
 
     <highlight language="config">
-    RedirectMatch temp .*  http://othersite.example.com/startpage.html
+RedirectMatch temp ".*"  "http://othersite.example.com/startpage.html"
     </highlight>
 </section>