after .htaccess url rewrite, cannot perform logoff in some of the url rewrited page

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-06-08T11:16:34Z Indexed on 2010/06/09 10:12 UTC
Read the original article Hit count: 295

Filed under:
|
|
|

Recently, I was doing .htaccess url rewrite, make all my php url into html, in some page, the logout button wont work properly. for example, in page ‘quotedetails/Q9999.html’ (rewrited from ‘quotedetails.php?quoteID=Q9999'), when I click logout button in this page, it wont do the trick, but when i use the old php url of this page, it works again, other rewrited pages like index.html (index.php), search.html(search.php), all works perfectly.

I use firebug to debug, after I click the logout button, it stays in the same page without redirect me to the index.html, but I saw the the ‘logoff’ params has been passed through, but just dont let me logout and redirect to index page. I’ve changed all the relavent file path to absolute path, still no luck…..help please.

I’ve also noticed from firebug, that page cannot get the redirect ‘location’ as I tried in other pages, their response headers come with ‘location: index.html’, but in that no-workin-page, there is no such line called ‘location: index.html’ in its response headers.

Here is my .htaccess file, no-workin-pages are related to the first four ReweiteRules

Options +FollowSymlinks
RewriteEngine on

RewriteRule ^reps/all,all.html$ rep.php?repID=all&repName=all   
RewriteRule ^reps/([A-Z]+),([A-Za-z\sA-Za-z]+).html$ rep.php?repID=$1&repName=$2
RewriteRule ^reps/([A-Za-z]+),([A-Za-z\sA-Za-z]+),([0-9]+).html$ rep.php?repID=$1repName=$2&page=$3
RewriteRule ^quotedetails/(Q[0-9]+).html$ quotedetails.php?quoteID=$1

RewriteRule ^index.html$ index.php   
RewriteRule ^addquote.html$ addquote.php   
RewriteRule ^search.html$ search.php   
RewriteRule ^viewall.html$ viewall.php   
RewriteRule ^howto.html$ howto.php   

© Stack Overflow or respective owner

Related posts about php

Related posts about css