PDA

View Full Version : .htaccess page redirect works in FF not IE



Nathan Keen
07-08-2009, 11:56 PM
I recently have redone a website for someone and so the folder names have been changed, so I used a htaccess file like so:



RewriteEngine On
RewriteRule ^html/P/13/B/112/(.*)$ http://www.saltshakers.org.au/index.php?option=com_content&view=article&id=83:tasmania&catid=37:parliaments-and-mps$1 [R=301,NC]


This works fine in firefox -- go to www.saltshakers.org.au/html/P/13/B/112/ (http://www.saltshakers.org.au/html/P/13/B/112/) and it redirects perfectly to the parliaments and mps tasmania page.
Do that same link in Ie7, and it does not work - it displays its own internal error page.

That seems really weird as as I read other documents I see that htaccess files are server side issues, not browser related.

Now, other info which may be helpful:
I have nameservers pointed to day3hosting, but dns A record to my shared host ip on bluehost, such that saltshakers.org.au is actually saltshakers.agap3.com

Any help appreciated.

redsox9
07-09-2009, 09:09 AM
Is this still an issue nine hours later? There should not be any dependence on the browser - it's controlled on the server end.

Nathan Keen
07-10-2009, 12:42 AM
yes, it is still an issue. weird huh!?

wysiwyg
07-10-2009, 12:40 PM
Why is the 301 redirect not changing the URL?

Nathan Keen
07-10-2009, 10:50 PM
the 301 redirect works. on every browser except ie.

After changing a few things a number of times, it seems like IE is not picking up the actual file .htaccess -- which would make sense as the stuff in the htaccess does work.
**okay, nope ie is accessing htaccess.. let me stuff around more.

**update2**ah okay, the now edited out section in htaccess was causing problems for ie:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
but this is not sef...

felgall
07-11-2009, 03:22 PM
No browser accesses the .htaccess file at all. That file is processed entirely on the server. The only effect that the .htaccess file can have on browsers is in the headers that get passed to the browser prior to the page content.