Oops...I just realized that I accidentally posted the message below to wikien-l. I'm reposting it here in the hope that someone can help me out.
I'm trying to set up our MediaWiki site to use clean URLs and have run into a snag. My pages take a long time to load and kick out a couple of error messages that say "too many HTTP redirects" for the following URLs:
http://www.sourcewatch.org/-?action=raw&ctype=text%2Fcss&smaxage=180...
http://www.sourcewatch.org/-?action=raw&ctype=text%2Fjavascript&smax...
It appears that these URLs are being generated somehow by the lines in xhtml_slim.pt which read as follows:
<script type="text/javascript" tal:attributes="src jsvarurl"></script> and:
<style tal:condition="usercss" type="text/css">/*<![CDATA[*/ ${usercss} /*]]>*/</style> <script tal:condition="userjs" type="text/javascript" tal:attributes="src userjs"></script><script tal:condition="userjsprev" type="text/javascript">/*<![CDATA[*/${userjsprev}/*]]>*/</script> When I delete these lines, the error messages stop.
I've reviewed the MediaWiki page on rewrite rules and am wondering if my problem has to do with the ampescape patch that it says is needed for Apache. I haven't tried installing the patch and don't know if I'll be able to. (The patch says it's for Apache 1.3.26, whereas I have 1.3.29. Also, I don't know if my web host will agree to install the patch.)
I'm guessing that if I can't patch Apache, I can get away with deleting the lines above from xhtml_slim.pt, and everything will work except that (1) users won't be able to customize their javascript and css, and (2) ampersands won't work in page titles. Is this correct?
The current rewrite rules in my .htaccess file are as follows:
RewriteCond %{REQUEST_URI} !^/(stylesheets|images)/ RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html RewriteCond %{REQUEST_URI} !^/favicon.ico RewriteCond %{REQUEST_URI} !^/robots.txt
# Rewrite http://www.sourcewatch.org/article properly RewriteRule ^(.*)$ /index.php?title=$1 [L,QSA]
Can someone tell me what I need to do?
Regards, Sheldon Rampton
On Jan 15, 2005, at 12:07 PM, Sheldon Rampton wrote:
Oops...I just realized that I accidentally posted the message below to wikien-l. I'm reposting it here in the hope that someone can help me out.
I'm trying to set up our MediaWiki site to use clean URLs and have run into a snag. My pages take a long time to load and kick out a couple of error messages that say "too many HTTP redirects" for the following URLs:
First, update your code to the current 1.3.9 if you haven't already.
Your Special:Version indicates 1.3.7, which doesn't contain the fix for generating correct URLs when $wgScriptPath is "" for a root-level wiki; this leads to an infinite redirect loop due to the security checks for a severe Internet Explorer bug which would allow for JavaScript attacks which could at a minimum compromise user account information (this has been discussed elsewhere on the lists, including recently on mediawiki-l).
With the additional fix (added in 1.3.8) the URLs generated will be in the form /index.php?title=-&raw=..... and should not loop unless you have some other weird problem.
1.3.8 and 1.3.9 fix additional potential security problems with uploads, so if you have uploads enabled you should have upgraded a long time ago.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org