.htaccess is is directive file used by PHP script to manage their web for some reason. In .htaccess there is some parameters called RewriteBase that represented the base folder to rewrite.
On some server like on localhost this RewriteBase parameter can be disabled by adding ‘#’ characters (without quotes) before RewriteBase
RewriteBase Disabled Example: #RewriteBase /
and .htaccess still works fine but some server case like 000webhost, if RewriteBase paramater not defined, then this .htaccess file will not works and you will get some error pages where should to rewrite.
To enable rewriting, you must set RewriteBase correctly by this: