summaryrefslogtreecommitdiff
path: root/apache-config
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2009-08-20 15:49:03 +0200
committerdakkar <dakkar@thenautilus.net>2009-08-20 15:49:03 +0200
commit9b44a8724c2b1c4ac5f0570557e3679df8af682a (patch)
tree48be6cb940346edd06db41d3fc61afa1952d3e8d /apache-config
parentfirst stab at a stylesheet (diff)
downloadthenautilus-9b44a8724c2b1c4ac5f0570557e3679df8af682a.tar.gz
thenautilus-9b44a8724c2b1c4ac5f0570557e3679df8af682a.tar.bz2
thenautilus-9b44a8724c2b1c4ac5f0570557e3679df8af682a.zip
files to configure Apache for this site
Diffstat (limited to 'apache-config')
-rw-r--r--apache-config37
1 files changed, 37 insertions, 0 deletions
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"
+
+<Directory "/var/www/localhost/htdocs">
+ Options FollowSymLinks MultiViews
+
+ Order allow,deny
+ Allow from all
+</Directory>
+
+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]