diff options
author | Ken Coar <coar@apache.org> | 2015-04-15 19:46:53 +0200 |
---|---|---|
committer | Ken Coar <coar@apache.org> | 2015-04-15 19:46:53 +0200 |
commit | 57ef10245b3cf962dcbe40d205d94c241bed7f0e (patch) | |
tree | 596b4aacaa742456ddd5a457f712481ae85dffc2 /docs/manual/rewrite | |
parent | Mention which indexoptions need fancyindexing. Rsesolves bz56985 (diff) | |
download | apache2-57ef10245b3cf962dcbe40d205d94c241bed7f0e.tar.xz apache2-57ef10245b3cf962dcbe40d205d94c241bed7f0e.zip |
Enclose parameters in quotation marks for <{Files,Directory,Location}{,Match}>
containers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673892 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/rewrite')
-rw-r--r-- | docs/manual/rewrite/access.html.en | 4 | ||||
-rw-r--r-- | docs/manual/rewrite/access.xml | 4 | ||||
-rw-r--r-- | docs/manual/rewrite/remapping.html.en | 6 | ||||
-rw-r--r-- | docs/manual/rewrite/remapping.xml | 23 | ||||
-rw-r--r-- | docs/manual/rewrite/vhosts.html.en | 2 | ||||
-rw-r--r-- | docs/manual/rewrite/vhosts.xml | 2 |
6 files changed, 24 insertions, 17 deletions
diff --git a/docs/manual/rewrite/access.html.en b/docs/manual/rewrite/access.html.en index afa0e5be33..ab61fa31e3 100644 --- a/docs/manual/rewrite/access.html.en +++ b/docs/manual/rewrite/access.html.en @@ -113,7 +113,7 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC]</pre> accomplished without the use of mod_rewrite:</p> <pre class="prettyprint lang-config">SetEnvIf Referer example\.com localreferer -<FilesMatch \.(jpg|png|gif)$> +<FilesMatch "\.(jpg|png|gif)$"> Require env localreferer </FilesMatch></pre> @@ -173,7 +173,7 @@ RewriteRule ^/secret/files/ - [F]</pre> same end using alternate means, as illustrated here: </p> <pre class="prettyprint lang-config">SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway -<Location /secret/files> +<Location "/secret/files"> <RequireAll> Require all granted Require not env goaway diff --git a/docs/manual/rewrite/access.xml b/docs/manual/rewrite/access.xml index fddc0aad6b..0830852c60 100644 --- a/docs/manual/rewrite/access.xml +++ b/docs/manual/rewrite/access.xml @@ -122,7 +122,7 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC] <highlight language="config"> SetEnvIf Referer example\.com localreferer -<FilesMatch \.(jpg|png|gif)$> +<FilesMatch "\.(jpg|png|gif)$"> Require env localreferer </FilesMatch> </highlight> @@ -184,7 +184,7 @@ RewriteRule ^/secret/files/ - [F] </p> <highlight language="config"> SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway -<Location /secret/files> +<Location "/secret/files"> <RequireAll> Require all granted Require not env goaway diff --git a/docs/manual/rewrite/remapping.html.en b/docs/manual/rewrite/remapping.html.en index 77102ba7f0..4804f5103d 100644 --- a/docs/manual/rewrite/remapping.html.en +++ b/docs/manual/rewrite/remapping.html.en @@ -218,7 +218,7 @@ RewriteRule ^foo\.html$ foo.cgi [H=<strong>cgi-script</strong>]</pre> <pre class="prettyprint lang-config"># backward compatibility ruleset for # rewriting document.html to document.php # when and only when document.php exists -<Directory /var/www/htdocs> +<Directory "/var/www/htdocs"> RewriteEngine on RewriteBase /var/www/htdocs @@ -535,7 +535,7 @@ that should go to an existing resource such as an image, or a css file.</dd> <dd> <p>As of version 2.2.16, you should use the <code class="directive"><a href="../mod/mod_dir.html#fallbackresource">FallbackResource</a></code> directive for this:</p> -<pre class="prettyprint lang-config"><Directory /var/www/my_blog> +<pre class="prettyprint lang-config"><Directory "/var/www/my_blog"> FallbackResource index.php </Directory></pre> @@ -544,7 +544,7 @@ that should go to an existing resource such as an image, or a css file.</dd> complicated than this, you can use a variation of the following rewrite set to accomplish the same thing:</p> -<pre class="prettyprint lang-config"><Directory /var/www/my_blog> +<pre class="prettyprint lang-config"><Directory "/var/www/my_blog"> RewriteBase /my_blog RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f diff --git a/docs/manual/rewrite/remapping.xml b/docs/manual/rewrite/remapping.xml index 0cde299ff4..9415fcd5a2 100644 --- a/docs/manual/rewrite/remapping.xml +++ b/docs/manual/rewrite/remapping.xml @@ -116,7 +116,9 @@ RewriteRule ^<strong>/foo</strong>\.html$ <strong>bar</strong>.html [<stron use the Redirect directive. mod_rewrite was used in that earlier example in order to hide the redirect from the client:</p> - <highlight language="config">Redirect /foo.html /bar.html</highlight> + <highlight language="config"> +Redirect /foo.html /bar.html + </highlight> </dd> </dl> @@ -143,16 +145,19 @@ RewriteRule ^<strong>/foo</strong>\.html$ <strong>bar</strong>.html [<stron to the new server, but you might also consider using the Redirect or RedirectMatch directive.</p> -<highlight language="config">#With mod_rewrite +<highlight language="config"> +#With mod_rewrite RewriteEngine on RewriteRule ^/docs/(.+) http://new.example.com/docs/$1 [R,L] </highlight> -<highlight language="config">#With RedirectMatch +<highlight language="config"> +#With RedirectMatch RedirectMatch ^/docs/(.*) http://new.example.com/docs/$1 </highlight> -<highlight language="config">#With Redirect +<highlight language="config"> +#With Redirect Redirect /docs/ http://new.example.com/docs/ </highlight> </dd> @@ -219,7 +224,7 @@ RewriteRule ^foo\.html$ foo.cgi [H=<strong>cgi-script</strong>] # backward compatibility ruleset for # rewriting document.html to document.php # when and only when document.php exists -<Directory /var/www/htdocs> +<Directory "/var/www/htdocs"> RewriteEngine on RewriteBase /var/www/htdocs @@ -547,7 +552,7 @@ that should go to an existing resource such as an image, or a css file.</dd> module="mod_dir">FallbackResource</directive> directive for this:</p> <highlight language="config"> -<Directory /var/www/my_blog> +<Directory "/var/www/my_blog"> FallbackResource index.php </Directory> </highlight> @@ -557,7 +562,7 @@ complicated than this, you can use a variation of the following rewrite set to accomplish the same thing:</p> <highlight language="config"> -<Directory /var/www/my_blog> +<Directory "/var/www/my_blog"> RewriteBase /my_blog RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f @@ -569,7 +574,9 @@ set to accomplish the same thing:</p> <p>If, on the other hand, you wish to pass the requested URI as a query string argument to index.php, you can replace that RewriteRule with:</p> -<highlight language="config">RewriteRule (.*) index.php?$1 [PT,QSA]</highlight> +<highlight language="config"> +RewriteRule (.*) index.php?$1 [PT,QSA] +</highlight> <p>Note that these rulesets can be used in a <code>.htaccess</code> file, as well as in a <Directory> block.</p> diff --git a/docs/manual/rewrite/vhosts.html.en b/docs/manual/rewrite/vhosts.html.en index e789ba17d6..1946a98d21 100644 --- a/docs/manual/rewrite/vhosts.html.en +++ b/docs/manual/rewrite/vhosts.html.en @@ -128,7 +128,7 @@ UseCanonicalName Off LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon CustomLog logs/access_log vcommon -<Directory /www/hosts> +<Directory "/www/hosts"> # ExecCGI is needed here because we can't force # CGI execution in the way that ScriptAlias does Options FollowSymLinks ExecCGI diff --git a/docs/manual/rewrite/vhosts.xml b/docs/manual/rewrite/vhosts.xml index afb2b9933c..8a44a85016 100644 --- a/docs/manual/rewrite/vhosts.xml +++ b/docs/manual/rewrite/vhosts.xml @@ -137,7 +137,7 @@ UseCanonicalName Off LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon CustomLog logs/access_log vcommon -<Directory /www/hosts> +<Directory "/www/hosts"> # ExecCGI is needed here because we can't force # CGI execution in the way that ScriptAlias does Options FollowSymLinks ExecCGI |