From: Rich Bowen Date: Wed, 9 May 2012 00:39:15 +0000 (+0000) Subject: Remove superfluous HTML that's interfering with syntax highlighting. X-Git-Tag: 2.4.3~469 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbfe0fcb30c7510f7b3f50d3c99982c85095e53e;p=apache Remove superfluous HTML that's interfering with syntax highlighting. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1335862 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/rewrite/access.xml b/docs/manual/rewrite/access.xml index 2b6c677c5b..34082b0d79 100644 --- a/docs/manual/rewrite/access.xml +++ b/docs/manual/rewrite/access.xml @@ -84,27 +84,27 @@ configuration. -RewriteCond %{HTTP_REFERER} !^$ +RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !www.example.com [NC] -RewriteRule \.(gif|jpg|png)$ - [F,NC] +RewriteRule \.(gif|jpg|png)$ - [F,NC]

In this second example, instead of failing the request, we display an alternate image instead.

-RewriteCond %{HTTP_REFERER} !^$ +RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !www.example.com [NC] -RewriteRule \.(gif|jpg|png)$ /images/go-away.png [R,NC] +RewriteRule \.(gif|jpg|png)$ /images/go-away.png [R,NC]

In the third example, we redirect the request to an image on some other site.

-RewriteCond %{HTTP_REFERER} !^$ +RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !www.example.com [NC] -RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC] +RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC]

Of these techniques, the last two tend to be the most effective @@ -171,9 +171,9 @@ SetEnvIf Referer example\.com localreferer particular source.

-RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot -RewriteCond %{REMOTE_ADDR} =123\.45\.67\.[8-9] -RewriteRule ^/secret/files/ - [F] +RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot +RewriteCond %{REMOTE_ADDR} =123\.45\.67\.[8-9] +RewriteRule ^/secret/files/ - [F]