.htaccess mod_rewrite trouble

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?

Upvotes: 0

Views: 724

Answers (2)

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.

Upvotes: 1

Tea Curran
Tea Curran

Reputation: 2983

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 /

Upvotes: 0

Related Questions