From: jongfoster Date: Mon, 25 Mar 2002 23:13:33 +0000 (+0000) Subject: Using canonical hostname X-Git-Tag: v_2_9_5~33 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=9c63d5fc0ef079cf0d29d64cb2cb5c26a196fac1 Using canonical hostname --- diff --git a/doc/webserver/.htaccess b/doc/webserver/.htaccess new file mode 100644 index 00000000..0ecf688d --- /dev/null +++ b/doc/webserver/.htaccess @@ -0,0 +1,26 @@ +# http://privoxy.org/.htaccess +# +# By Jon Foster +# +# Intercepts requests for these servers: +# http://ijbswa.sourceforge.net/ +# http://privoxy.com/ +# http://www.privoxy.com/ +# http://www.privoxy.org/ +# +# And redirects all requests to the canonical web server: +# http://privoxy.org/ +# +# +# Uses Apache's mod_rewrite +# See http://httpd.apache.org/docs/mod/mod_rewrite.html +# + +# Enable mod_rewrite +RewriteEngine on + + +RewriteCond %{HTTP_HOST} !^privoxy\.org\.?$ [NC] +RewriteCond %{HTTP_HOST} !^$ +RewriteRule ^(.*)$ http://privoxy.org/$1 [R,L] + diff --git a/doc/webserver/config/.htaccess b/doc/webserver/config/.htaccess index 934ac19c..0a2bfbf9 100644 --- a/doc/webserver/config/.htaccess +++ b/doc/webserver/config/.htaccess @@ -3,7 +3,9 @@ # By Jon Foster # # Redirects any request for any file in this directory tree -# to an error page. +# to an error page. The error page is reached through the +# URL http://privoxy.org/config/ and is actually in +# the file index.php # # Uses Apache's mod_rewrite # See http://httpd.apache.org/docs/mod/mod_rewrite.html @@ -16,13 +18,17 @@ RewriteEngine on RewriteBase /config/ # The only file which really exists is index.php - allow this +RewriteCond %{HTTP_HOST} ^privoxy\.org\.?$ [NC,OR] +RewriteCond %{HTTP_HOST} ^$ RewriteRule index.php - [L] # Silently redirect the config dir to index.php +RewriteCond %{HTTP_HOST} ^privoxy\.org\.?$ [NC,OR] +RewriteCond %{HTTP_HOST} ^$ RewriteRule ^$ index.php [L] # anything else gets redirected to the config dir, and we update # the browser's location bar. -RewriteRule ^(.*)$ /config/ [R] +RewriteRule ^(.*)$ http://privoxy.org/config/ [R,L]