I’d take out the R=301 if you don’t want to see the rewritten URL.
I had a little different problem caused by using Apache 1.3(.31) under Win32. I had capital letters in the friendly URLs which Apache went and forced to lowercase. I finally got it worked out by adding a third rewrite condition:
RewriteCond %{REQUEST_URI} ^/[^/]*(.*)$
then changing the rewrite rule to:
RewriteRule ^(.*)$ index.php?q=%1 [L,QSA]
The condition assumes that MODx is installed in a subdirectory. The backreference to the condition provides the proper case for the alias. I don’t know if this behavior still exists in newer Apache versions.
Erik
Haven’t read this whole thread yet, and maybe this wasn’t available in that version, but have you tried adding the no case [NC] flag to your rewrite rules? This makes it case-insensitive.
<link href="templates/styles.css" rel="stylesheet" type="text/css" /> <!-- the css document is in MODx in a folder called templates --> <script src="scripts/scripts.js" type="text/javascript"></script> <!-- the css document is in MODx in a folder called scripts -->
BrowserMatch "MSIE" brokenvary=1
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
BrowserMatch "Opera" !brokenvary
SetEnvIf brokenvary 1 force-no-vary
<style type="text/css">
@import url('templates/styles.css');
</style>
This discussion is closed to further replies. Keep calm and carry on.