From 9b44a8724c2b1c4ac5f0570557e3679df8af682a Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 20 Aug 2009 15:49:03 +0200 Subject: files to configure Apache for this site --- apache-config | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 apache-config (limited to 'apache-config') diff --git a/apache-config b/apache-config new file mode 100644 index 0000000..9f8f754 --- /dev/null +++ b/apache-config @@ -0,0 +1,37 @@ +DocumentRoot "/var/www/localhost/htdocs" + + + Options FollowSymLinks MultiViews + + Order allow,deny + Allow from all + + +RewriteEngine On +#RewriteLog /var/log/apache2/rewrite_log +#RewriteLogLevel 9 + +# set exceptions here (all webapps, aliases, services, etc) +RewriteCond %{REQUEST_URI} /manual/ +RewriteRule ^(.*)$ $1 [L,PT] + +# root -> index document +RewriteRule ^/$ /index/ [R,NS,L] + +# keep language if coming from an explicitly-selected-lang document +RewriteCond %{HTTP_REFERER} /([a-z][a-z])$ +RewriteRule ^(.*)/$ $1/%1 [R,L] + +# map directory names (with or without explicit lang) to file base names +# MultiViews will do the rest +RewriteRule ^(.*?)/[a-z][a-z]$ $1/document [L] +RewriteRule ^(.*)/$ $1/document [L] + +# pass the explicit lang to MultiViews +SetEnvIf Request_URI "/([a-z][a-z])$" prefer-language=$1 + +# map paths from the old website to this one +RewriteMap oldpaths txt:oldpaths.txt + +RewriteCond ${oldpaths:%{REQUEST_URI}} ^(.+)$ +RewriteRule \.html$ %1 [R=301,L,NS] -- cgit v1.2.3