On Fri, 2011-06-03 at 15:28 +0200, Raphael Hertzog wrote:
> This patch does not strip trailing whitespaces. The [^/]+ or .+ are greedy
> and will eat the whitespaces. Thus \s*$ will always match the empty
> string. Please update your patch.
Ah, thanks, updated patch below:
--- a/apache.conf
+++ b/apache.conf
@@ -15,11 +15,11 @@
RewriteEngine on
RewriteRule ^/$ /common/index.html [L,R]
RewriteRule ^/favicon\.ico$ http://www.debian.org/favicon.ico [L,R]
-RewriteRule ^/lib([^/])([^/]+)$ /lib$1/lib$1$2.html [L,R]
-RewriteRule ^/([^/])([^/]+)$ /$1/$1$2.html [L,R]
-RewriteCond %{QUERY_STRING} ^src=lib(.)(.+)$
+RewriteRule ^/\s*lib([^/\s])([^/\s]+)\s*$ /lib$1/lib$1$2.html [L,R]
+RewriteRule ^/\s*([^/\s])([^/\s]+)\s*$ /$1/$1$2.html [L,R]
+RewriteCond %{QUERY_STRING} ^src=\s*lib([^\s])([^\s]+)\s*$
RewriteRule ^/common/index.html$ /lib%1/lib%1%2.html? [L,R,NE]
-RewriteCond %{QUERY_STRING} ^src=(.)(.+)$
+RewriteCond %{QUERY_STRING} ^src=\s*([\s])([\s]+)\s*$
RewriteRule ^/common/index.html$ /%1/%1%2.html? [L,R,NE]
</VirtualHost>
--
bye,
pabs
http://wiki.debian.org/PaulWise
Attachment:
signature.asc
Description: This is a digitally signed message part