[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r10297 - /man-cgi/conf/htaccess



Author: jfs
Date: Wed Oct 30 02:10:37 2013
New Revision: 10297

URL: http://svn.debian.org/wsvn/?sc=1&rev=10297
Log:
Improve htaccess with more redirections: for 404 use the static page, allow redirection when missing the first slash. Add also redirections for server downtime

Modified:
    man-cgi/conf/htaccess

Modified: man-cgi/conf/htaccess
URL: http://svn.debian.org/wsvn/man-cgi/conf/htaccess?rev=10297&op=diff
==============================================================================
--- man-cgi/conf/htaccess	(original)
+++ man-cgi/conf/htaccess	Wed Oct 30 02:10:37 2013
@@ -1,9 +1,28 @@
 Options ExecCGI Indexes FollowSymLinks
 IndexOptions -FancyIndexing
 AddHandler cgi-script .cgi
+# Redirect errors to the script
+ErrorDocument 404 /static/not_found.html
+
+# To be used only on downtime - redirect to error page
+#
+#RewriteEngine on
+#RewriteBase /
+#RewriteCond %{REQUEST_URI} ^/error/.* [NC]
+#RewriteRule .* - [L]
+##
+#RewriteCond %{ENV:REDIRECT_STATUS} 200
+#RewriteRule .* - [L]
+##
+#RewriteCond %{REQUEST_FILENAME} !-f
+#RewriteCond %{REQUEST_FILENAME} !-d
+#RewriteRule ^(.*) /error/server-not-available.html [R=302,L]
+#
 
 # redirections for HTML documentation
+# to be used when the server is running
 RedirectMatch 301 ^/man/([0-9ln]p?m?)/(.*$) /cgi-bin/man.cgi?sektion=$1\&query=$2\&apropos=0\&manpath=sid\&locale=en
+RedirectMatch 301 ^/man([0-9ln]p?m?)/(.*$) /cgi-bin/man.cgi?sektion=$1\&query=$2\&apropos=0\&manpath=sid\&locale=en
 RedirectMatch 301 ^/man/([a-z]*)/([0-9ln]p?m?)/(.*$) /cgi-bin/man.cgi?manpath=$1\&sektion=$2\&query=$3\&apropos=0\&locale=en
 RedirectMatch 301 ^/man/(.*$) /cgi-bin/man.cgi?query=$1\&apropos=1\&manpath=sid\&format=html\&locale=en
 RedirectMatch 301 ^/index.html /cgi-bin/man.cgi


Reply to: