Home Apache Rewrite URL to mobile site
Reply: 0

Apache Rewrite URL to mobile site

user670 Published in June 20, 2018, 7:43 am

I need to rewrite our url based on user-agent. I can filter the user agent using apache RewriteCond but my rewrite rule doesn't work. This is what I need.

Original URL


to this


Note the #! symbols is removed

My configuration is this.

RewriteCond %{REQUEST_URI} /([^/]+)/$

#Now redirect to the mobile site
RewriteRule ^ https://%{HTTP_HOST}/string1/m/%1.html [R,L]

My server is Centos 6.4 and httpd-2.2.15. Thanks in advance for your help.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.359613 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO