Internet Explorer, REQUEST_URI, and Mod Rewrite Problem?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Internet Explorer, REQUEST_URI, and Mod Rewrite Problem?

Post by JAB Creations »

I finally decided to try and track down one of the many bugs that only seems to effect IE. It's a strange combination of PHP's $_SERVER['REQUEST_URI'] variable, Internet Explorer, and Apache mod rewrite.

For some dumb reason IE treats the last JavaScript file inside the head element on the next version of my site as $_SERVER['REQUEST_URI']. The only thing this effects is what page IE users are redirected to after signing in and it currently redirects to the JavaScript file. 8O When I comment the script element it seems to work perfectly fine...the thing is there is nothing PHP related to that JavaScript file...so I'm absolutely at a loss there, why wouldn't the stylesheet served just before the JavaScript file not take it's place after I commented the JavaScript file out? Both are in directories with exceptions in the .htaccess file. I can only presume it's some buggy behavior with IE...it's almost like there is some kind of trend! :evil:

Here is my .htaccess file with the relevant code...I've spent the past few hours searching and it seems to be a very vague Apache bug apparently...though if it was an Apache bug then it would effect all browsers right? I'm totally thrown off if it's specifically IE or an IE+something else sort of bug? Is my mod rewrite written incorrectly? Thoughts please?

Code: Select all

<ifmodule mod_rewrite.c>
 RewriteEngine on
 RewriteRule ^(exception1/|exception2/|exception1.php) - [L]
 RewriteRule !\.(ico|jpg)$ index.php
 
 RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
 RewriteRule ^index\.php$ http://%{SERVER_NAME} [NC,R=301,L]
</ifmodule>
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Internet Explorer, REQUEST_URI, and Mod Rewrite Problem?

Post by requinix »

What's the path to the JavaScript file? (URI, not file system)
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Internet Explorer, REQUEST_URI, and Mod Rewrite Problem?

Post by JAB Creations »

The path is scripts/index.js (from the public root).
Post Reply