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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -