.htaccess - How do not redirect to /public_html if request is equaled /abc/* for example? -
there such structure of directories:
/public_html /abc .htaccess
now requests go folder /public_html. code of .htaccess:
rewriteengine on rewritecond %{request_uri} !public_html/ rewriterule (.*) /public_html/$1 [l]
what should requests [the website address]/abc/*
redirect folder /abc instead of /public_html?
something that:
example.com/* - go /public_html
example.com/abc/* - go /abc
thanks! , i'm sorry english!
rewritecond %{request_uri} !public_html/
means want rewrite if request_uri not contain public_html/
. make sure not rewriting uri abc/
need condition says add
rewritecond %{request_uri} !abc/
after first rewritecond , should work. if not contain either abc/ or public_html/ rewrite url.
Comments
Post a Comment