rewrite rule if iphone?
Posted
by
daniel Crabbe
on Pro Webmasters
See other posts from Pro Webmasters
or by daniel Crabbe
Published on 2010-10-13T14:07:32Z
Indexed on
2011/02/16
7:34 UTC
Read the original article
Hit count: 462
hello there.
just need one url on my site to check if its a mobile device and then rerite the url accordingly.
want to rewrite; /play-reel/miranda-bowen/playpeaches-and-cream to /mobile/play-reel/miranda-bowen/playpeaches-and-cream
RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$ [NC]
RewriteRule ^play-reel(.*)\$ mobile/play-reel$1 [R=302,NC]
RewriteRule ^mobile/play-reel/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)$ play-reel-new-html5-02.php?director=$1&video=$2 [L]
# the 3rd line works but cant get the url to change for it to be picked up
can anyone see what's wrong? There's no erro
best, Dan
© Pro Webmasters or respective owner