wordpress - Redirect Directory Index Only -


i redirect visitors of /tools/ /tools-reroute, straightforward.

the tricky part not want pages in sub-directories such /tools/tool1 redirected.

the reason of trying include custom web-apps on same domain wordpress site. curious users go /tools/ see else lies there, find directory index, not ideal. redirecting /tools-reroute lands them on wordpress page. if there different solution entirely, i'm ears. thanks!

just add line on top of existing wordpress rules in main wordpress .htaccess file:

rewriterule ^tools/?$ /tools-reroute [r=301,l,nc] 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -