1.1 --- a/moinsetup.py Wed Dec 19 00:54:18 2012 +0100
1.2 +++ b/moinsetup.py Thu Jan 10 22:06:27 2013 +0100
1.3 @@ -77,12 +77,12 @@
1.4 # in different places, however.
1.5
1.6 apache_htaccess_combined_mod_rewrite = """\
1.7 -DirectoryIndex %(url_path)s/moin.cgi/
1.8 +DirectoryIndex %(url_path_tr)s/moin.cgi/
1.9 RewriteEngine On
1.10 RewriteBase %(final_url_path)s
1.11 RewriteCond %%{REQUEST_FILENAME} !-f
1.12 RewriteCond %%{REQUEST_FILENAME} !-d
1.13 -RewriteRule ^(.*) %(url_path)s/moin.cgi/$1 [PT,L,QSA]
1.14 +RewriteRule ^(.*) %(url_path_tr)s/moin.cgi/$1 [PT,L,QSA]
1.15 """
1.16
1.17 # Post-setup templates.
1.18 @@ -460,6 +460,8 @@
1.19 self.url_path = self._tidy_url_path(url_path)
1.20 self.static_url_path = static_url_path and self._tidy_url_path(static_url_path)
1.21
1.22 + self.url_path_tr = self._truncate_url_path(url_path)
1.23 +
1.24 # Define and create specific directories.
1.25 # Here are the configuration and actual Wiki data directories.
1.26
1.27 @@ -587,6 +589,12 @@
1.28 else:
1.29 return url_path
1.30
1.31 + def _truncate_url_path(self, url_path):
1.32 + if url_path.endswith("/"):
1.33 + return url_path[:-1]
1.34 + else:
1.35 + return url_path
1.36 +
1.37 def _set_pythonpath(self):
1.38 path = os.environ.get("PYTHONPATH", "")
1.39