Mod_rewrite Issues

software development

#1

I have the following mod_rewrite code

Options -Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteRule map/(.)/(.)$ /map/$1/$2/ [NC,R]
RewriteRule lsu$ /map/lsu/2/ [NC,R]
RewriteRule arkansas$ /map/arkansas/1/ [NC,R]
RewriteRule map/(.)/(.)/$ /map.php?friendlyURL=$1&schoolID=$2 [NC]

This works fine in Firefox, but does not work in IE. To test you can go to

http://www.recruitmaps.com/arkansas in both browsers and see the difference. Any help as to why IE is not working?

Thanks.


#2

I got it fixed. It had to do with the order of the rules in the .htaccess file. I’m not sure why Firefox doesn’t care about the order but IE does.

The rules were changed to
RewriteRule map/(.)/(.)/$ /map.php?friendlyURL=$1&schoolID=$2 [NC]
RewriteRule map/(.)/(.)$ /map/$1/$2/ [NC,R]
RewriteRule ^lsu$ /map/lsu/2/ [NC,R]
RewriteRule ^arkansas$ /map/arkansas/1/ [NC,R]