apache - Rewrite rule to globally omit subdirectory in URL -
we have site , like:
www.domain.com/forum/us www.domain.com/forum/ca www.domain.com/forum/mx
etc.
what we'd url rewrite globally strip out "forum" such added www.domain.com/{country}. such as:
www.domain.com/us(/) www.domain.com/ca(/) www.domain.com/mx(/)
is there way within apache rewrite rules ignore directory url in such blanket manner?
you can use following in /root/.htaccess
rewriteengine on #--don't rewrite existent directries rewritecond %{request_filename} !-d #--and files rewritecond %{request_filename} !-f #--rewrite other request "/forum/" rewriterule ^(.+)$ /forum/$1 [nc,l]
Comments
Post a Comment