apache - RewriteEngine is not working [.htaccess] -
rewrite engine not working, i'm using 000webhost web hosting service provider , i'm on free plan.
problems:
1.) when go domain (without subdomains) prospekt.ml, i'm gonna redirected 000webhost 404 error.
2.) when tried test .htaccess if it's working. it's supposed rewrite url , add vanity url. (user/astroxoom) instead of that, i'm getting redirected 000webhost 404 error.
the .htaccess file placed on public_html folder. should redirect "member/user/username.php?username=$1"
screenshot of public_html
thank , have day!
edit:
.htaccess file
# not remove line, otherwise mod_rewrite rules stop working rewritebase / # fancy indexing options indexes indexoptions fancyindexing namewidth=80 scanhtmltitles indexorderdefault ascending date indexignore *.jpg *.png # rewrite users rewriteengine on rewriterule ^member/user/([^/]+)$ member/user/username.php?username=$1 [l,qsa]
on 000webhost server have use absolute rewrite path (starting /) or rewritebase directive map rewritten url correct location 000webhost server uses virtual user home directory, it's important add rewritebase directive when using relative path in rewrite target, otherwise 404 not found.
source :
Comments
Post a Comment