Noob with rewrite issues in IE6

Oh, the strange things mod_rewrite does!

Noob with rewrite issues in IE6

Postby jtomlinson » Fri Jun 12, 2009 7:59 am

First I'll state I'm a complete mod_rewrite noob, but I'm trying...

I've been using the following rule which works in FF, Chrome, IE7 and IE8, but not in IE6
Code: Select all
RewriteEngine On

RewriteRule \.(css|jpe?g|gif|png)$ - [L,QSA,NC]

RewriteRule ^hangman$ /index.php?game=hangman [L,QSA,NC]
RewriteRule ^hangman/([^/\.]+)/?$ /index.php?game=hangman&action=$1 [L,QSA,NC]

RewriteRule ^([^/\.]+)/?$ /index.php?request=$1 [L,QSA,NC]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ /index.php?request=$1&id=$2 [L,QSA,NC]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?request=$1&id=$2&action=$3 [L,QSA,NC]


The main site loads just fine in every browser, even IE6. However when links like the following are clicked I get a blank page in IE6 only
Code: Select all
http://simplisticgames.com/contact
http://simplisticgames.com/register


However if I manually type the links into the browser, in IE6, they work just fine. Also links like the following DO work in IE6
Code: Select all
http://simplisticgames.com/hangman


Any help would be greatly appreciated.

*edit*

Also, if I change
Code: Select all
RewriteRule ^([^/\.]+)/?$ /index.php?request=$1 [L,QSA,NC]

to
Code: Select all
RewriteRule ^([^/\.]+)/?$ /index.php?request=test [L,QSA,NC]

It will work.
jtomlinson
 
Posts: 7
Joined: Fri Jun 12, 2009 7:41 am

Postby richardk » Fri Jun 12, 2009 8:54 am

The browser should not affect mod_rewrite.

What happens if you replace QSA with R?
What happens if you rewrite to a different file?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby jtomlinson » Fri Jun 12, 2009 10:02 am

richardk wrote:What happens if you replace QSA with R?

Replacing QSA with R doesn't change the result when using IE6.

I found that if I click a link that returns a blank page, then refresh the page, it loads correctly...
jtomlinson
 
Posts: 7
Joined: Fri Jun 12, 2009 7:41 am

Postby richardk » Sat Jun 13, 2009 2:16 pm

Is there any error in the server error log?
Can you get the HTTP headers sent from and to the browser?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby jtomlinson » Thu Jun 18, 2009 6:36 am

richardk wrote:Is there any error in the server error log?
Can you get the HTTP headers sent from and to the browser?


Not seeing any errors on the server. As for the HTTP headers, to be honest, I'm not 100% how to get what you're asking for.
jtomlinson
 
Posts: 7
Joined: Fri Jun 12, 2009 7:41 am

Postby jtomlinson » Thu Jun 18, 2009 8:05 am

Well I used the following link to look at the request/response headers, if thats what you're looking for and as far as I can tell (in my noob ways) everything looks alright.

Going to one of the links that doesn't work.
web-sniffer link
The only problem with using the sniffer is that it goes directly at the url, which works just fine in IE6 when I do it manually as well. It only fails in IE6 when I click the link, from a page.
jtomlinson
 
Posts: 7
Joined: Fri Jun 12, 2009 7:41 am

Postby richardk » Thu Jun 18, 2009 11:50 am

I downloaded TredoSoft MultipleIEs and couldn't replicate the problem.

Do you have a different computer with IE6 that you could test with?
Could you try the mod_rewrite on a different server?
If you View Source in IE6 of the blank page does it show the page's HTML?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby jtomlinson » Thu Jun 18, 2009 12:10 pm

richardk wrote:I downloaded TredoSoft MultipleIEs and couldn't replicate the problem.

Do you have a different computer with IE6 that you could test with?
Could you try the mod_rewrite on a different server?
If you View Source in IE6 of the blank page does it show the page's HTML?


I am running two different virtual PC's (both Windows 2000 with IE6 and latest 2000 SP's). When viewing source on the blank page, the source is blank as well. I've also had a couple friends try it on Windows 2000 with IE6 and they saw the same issue. As for trying it on a different server, I don't have access to one.

I'm doing quite a bit of testing today and I'm not 100% certain it is mod_rewrite causing the issue, but then again I'm not sure what IS causing the issue if it's not mod_rewrite.

I'm going to keep testing and see what I can come up with. Thanks for the help.
jtomlinson
 
Posts: 7
Joined: Fri Jun 12, 2009 7:41 am

Postby jtomlinson » Thu Jun 18, 2009 12:37 pm

/sigh

Guess I've been chasing the wrong thing ... After removing all the PHP from my index.php page (which is the default page and the page in which everything is processed through) all links work just fine.

Now to find the problem...

/sadface

If I remove session_start() every link works in IE6 ... guess its off to the php forums, thanks a lot for helping.
jtomlinson
 
Posts: 7
Joined: Fri Jun 12, 2009 7:41 am

Postby jtomlinson » Thu Jun 18, 2009 12:55 pm

And I finally found the issue...

http://forum.dreamhosters.com/programmi ... oblems.htm

By removing
Code: Select all
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">

it fixes the problem with IE6. Was how it was handling the session cookie and encoding.
jtomlinson
 
Posts: 7
Joined: Fri Jun 12, 2009 7:41 am


Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 4 guests

cron