Reputation: 1275
I need a URL rewrite rule for all links if a "mobile" cookie is present.
Our links currently like so: www.somesite.com/about.html
If this mobile cookie is detected I need all links rewritten www.somesite.com/m/#show/
So basically need /m/#show/ added and then just the page name with not suffix.
Not sure if this is possible but I appreciate any tips.
Upvotes: 1
Views: 309
Reputation: 785058
You can use a rule like this:
RewriteEngine On
RewriteCond %{HTTP_COOKIE} ^.*?mobile=.+ [NC]
RewriteRule ^about\.html$ /m/#show/ [NC,NE,L,R=302]
Upvotes: 1