开发者

rewrite rule if iphone?

开发者 https://www.devze.com 2023-01-20 06:38 出处:网络
just need one url on my site to check if its a mobile device and then rerite the url accordingly. want to rew开发者_StackOverflow中文版rite;

just need one url on my site to check if its a mobile device and then rerite the url accordingly.

want to rew开发者_StackOverflow中文版rite; http://2amfilms.co.ukl/play-reel/miranda-bowen/playpeaches-and-cream to http://2amfilms.co.ukl/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


Maybe instead this:

RewriteRule ^play-reel(.*)\$ mobile/play-reel$1 [R=302,NC] 

Try:

RewriteRule ^play-reel(.*)$ mobile/play-reel$1 [R=302,NC] 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号