# HG changeset patch # User Paul Boddie # Date 1378592031 -7200 # Node ID a95b3bd8f4e5b55f34cd56f8ac477e9a872d5858 # Parent d0d1b660c77882d94ed6bc97b66279cc1ab84ba0 Added workarounds for question marks in page names to the .htaccess deployment method configuration. diff -r d0d1b660c778 -r a95b3bd8f4e5 moinsetup.py --- a/moinsetup.py Tue Feb 26 01:08:13 2013 +0100 +++ b/moinsetup.py Sun Sep 08 00:13:51 2013 +0200 @@ -76,11 +76,29 @@ # If a DirectoryIndex directive is also desired, the Indexes option must be set. # Such a directive is not desirable where the static and dynamic resources are # in different places, however. +# +# The first three blocks of conditions and rules are used to work around a bug +# in mod_rewrite, supporting up to three question marks in URL paths. +# See: http://moinmo.in/MoinMoinBugs/CannotAccessPagesEndingWithAQuestionMark +# See: https://issues.apache.org/bugzilla/show_bug.cgi?id=49642 apache_htaccess_combined_mod_rewrite = """\ DirectoryIndex %(url_path_tr)s/moin.cgi/ RewriteEngine On RewriteBase %(final_url_path)s + +RewriteCond %%{REQUEST_FILENAME} !-f +RewriteCond %%{REQUEST_FILENAME} !-d +RewriteRule ^(.*)\?(.*)\?(.*)\?(.*) %(url_path_tr)s/moin.cgi/$1\%3f$2\%3f$3\%3f$4 [PT,L,QSA] + +RewriteCond %%{REQUEST_FILENAME} !-f +RewriteCond %%{REQUEST_FILENAME} !-d +RewriteRule ^(.*)\?(.*)\?(.*) %(url_path_tr)s/moin.cgi/$1\%3f$2\%3f$3 [PT,L,QSA] + +RewriteCond %%{REQUEST_FILENAME} !-f +RewriteCond %%{REQUEST_FILENAME} !-d +RewriteRule ^(.*)\?(.*) %(url_path_tr)s/moin.cgi/$1\%3f$2 [PT,L,QSA] + RewriteCond %%{REQUEST_FILENAME} !-f RewriteCond %%{REQUEST_FILENAME} !-d RewriteRule ^(.*) %(url_path_tr)s/moin.cgi/$1 [PT,L,QSA]