I have no idea why, but every time I do something with a complex pattern for a RewriteRule in a .htaccess file, I get a 500 internal error. My current .htaccess file in its entirety is:
RewriteEngine on
RewriteRule ^ups/sections/([A-Za-z]{3})/([A-Za-z0-9_-+\.]+)/?$ /dl.php?loct=sec&sec=$1&file=$2 [R=302]
I've tried with only "RewriteEngine on" and get no error. I've tried something really simple like: "RewriteRule ^ups/?$ /xyz [R]" which works perfectly. I've tried with and without the Symlinks option. I've tried with and without a slash at the beginning of the pattern and with and without a slash at the beginning of the replacement.
It seems like whenever I use "complex" looking regex, it just doesn't work.
Note: I don't own this server and can't change apache config files.
Any help would be appreciated.