Redirect requests for http://config.privoxy.org/.* to http://www.privoxy.org/config/
[privoxy.git] / doc / webserver / .htaccess
1 # http://www.privoxy.org/.htaccess
2 #
3 # Initial version written by Jon Foster
4 #
5 # Intercepts requests for these servers:
6 #    http://ijbswa.sourceforge.net/
7 #    http://privoxy.com/
8 #    http://www.privoxy.com/
9 #    http://privoxy.org/
10 #
11 # And redirects all requests to the canonical web server:
12 #    http://www.privoxy.org/
13 #
14 # Requests for: http://config.privoxy.org/.*
15 # are redirected to: http://www.privoxy.org/config/
16 #
17 # Uses Apache's mod_rewrite
18 # See http://httpd.apache.org/docs/mod/mod_rewrite.html
19 #
20
21 # Enable mod_rewrite
22 RewriteEngine on
23
24 # Note that the parentheses seem to be mandatory
25 # even if we aren't interested in what they match.
26 RewriteCond %{HTTP_HOST}   ^config\.privoxy\.org [NC]
27 RewriteRule ^(.*)$         http://www.privoxy.org/config/ [R,L]
28
29 RewriteCond %{HTTP_HOST}   !^www\.privoxy\.org\.?$ [NC]
30 RewriteCond %{HTTP_HOST}   !^$
31 RewriteRule ^(.*)$         http://www\.privoxy.org/$1 [R,L]
32