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=18…
http://www.sourcewatch.org/-?action=raw&ctype=text%2Fjavascript&sma…
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