htaccess problem with Chrome, but not Safari? - .htaccess

I have a very simple .htaccess file set up to redirect a 404 to a php script:
ErrorDocument 404 /404.php
This works as expected in Safari, but does not work in Google Chrome (on a Mac or a PC).
I have also put a 404.htm file to see if the php script was the problem, but had the same results.
Why would Chrome have a different experience over Safari for this? I expected the .htaccess file to be a server-side redirect, so there shouldn't be any browser issues.
(All cache was cleared on all browsers before testing as well)

Chrome displays specific error messages for 404 an such, you'll have to disable it manually in its options:
http://www.google.com/support/chrome/bin/answer.py?answer=95671

Related

htaccess umlaute redirect gives 404 in microsoft edge

I have a working htaccess in utf-8 with RewriteRules including German Umlaute. No problem here!
A simple redirect with German Umlaute ends in an 404 Error in Microsoft Edge.
redirect 302 /foo /bäh -> will become www.example.at/bäh
All other browsers (Firefox, Chrome, even IE11!!!) do the redirect with the correct encoding.

.htaccess files keeps redirecting in firefox

I modified my .htaccess file to prevent hotlinking. After that I reversed the change. Now in firefox it is still redirecting from domainname.com/imagedir/image1.jpg to domainname.com when I enter the URL directly. In other browsers it is working fine.

Redirection only happening in FF, Safari

It is a bit weird what I've been experiencing on a project I cloned from github.
I setup my vagrant then access the local IP address I specified for it :
http://4.4.4.16
On chrome => I'm getting 200 and the front page is displayed
On Safari and Firefox => I'm getting 320 and instantly redirected to scripts page on the web.
I investigated a bit and found a the following redirection implemented on the .htaccess
RewriteCond %{REMOTE_ADDR} !^127.0.0.1$
RewriteRule ^(.*)$ http://www.website-of-script.com/ [L]
I removed it and then everything went back to normal, FF and Safari displays now the page on local dev.
But I still don't understand why would Chrome jumps the redirection although it's basically clear to redirect all localhost while Safari and Firefox don't.

.htaccess custom 503 page won't work

First 3 Lines of my .htaccess file look like that:
ErrorDocument 403 /wartung/404.html
ErrorDocument 404 /wartung/404.html
ErrorDocument 503 /wartung/503.html
While 403 and 404 work out 503 still shows the old Server default Message. Files are all in the right directory. Also when i use Firebug i and click on the Network Request which results in 503 the "Answer" Tab shows my new 503 page but the browser windows shows the old one?
Any ideas about that? Server is some linux with apache 2.
Thanks in advance,
i3
Are you sure this isn't just some caching problem in your local browser? Have you tried clearing your cache and reloading the page?

.htaccess AddType plain/text

I have a page that I dynamically show my Unix scripts in another folder. I added:
AddType text/plain .sh <-- this is the only thing in .htaccess in the "unix" directory
So I could see the codes, but SOME files are still offered as a download while others go to the correct plain text display.
Here's the site live:
http://snyfarvu.farmingdale.edu/~gerbss/
Unix scripts: guess.sh, add.sh, lock.sh are the ones that are acting up
Thanks for your suggestions
It's working for me in Chrome, Firefox and Safari on Mac OS X. Did you click those links before adding the .htaccess? If so, your browser may be using the cached response which would be missing the content type header.
Try clearing your browser cache and trying again.

Resources