.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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -