apache - mod_rewrite of from example.com/ to example.com/home/ for certain user-agent -
i know should simple. can't right. following, can redirect example.com/abc example.com/home/abc not example.com/ example.com/home
rewritecond %{http_user_agent} ^.*chrome.* rewriterule ^([^/]+)/?$ home/$1
how can redirect / well?
if want redirect everything chrome
under home/
subdirectory, try following, match or nothing, , append after home/
rewritecond %{http_user_agent} ^.*chrome.* rewriterule ^(.*)$ home/$1
Comments
Post a Comment