.htaccess mod_rewrite trouble

Tag: .htaccess , mod-rewrite Author: colvin423 Date: 2011-10-29

So here's the thing .. I've been working on my webpage for some time now. I have a .htaccess in the root folder that contains only a few rows of rewriting rules and nothing else. It works fine on localhost but when I upload it to my host it just throws 404 error (my host is 000webhost.com). I tried eliminating every rule one by one to see where the error is, but nothing happened, I even deleted the contents of the .htaccess file and still it gives a 404 error. The only solution that worked (so far) was deleting the .htaccess file and only then the homepage appears. Any suggestions?

Other Answer1

I just found out that my host doesn't support UTF8 encoding (i guess?) in .htaccess file so i changed the encoding to ANSI and it did the trick.

Other Answer2

Have you tried the suggestion on your web host's site: http://www.000webhost.com/faq.php?ID=16

they are suggesting you put this at the top of your .htaccess RewriteBase /

comments:

yes I did that, but it still doesn't work