Mobile app version of vmapp.org
Login or Join
Kaufman445

: Rewrite rule if iphone? 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/playpeach

@Kaufman445

Posted in: #Apache #Iphone

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 [R=302,NC]

RewriteRule ^mobile/play-reel/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$ play-reel-new-html5-02.php?director=&video= [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

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Kaufman445

2 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

Take a look at the code you’ve provided in the answer. I’m not sure, but it might look like this:

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

10% popularity Vote Up Vote Down


 

@Si4351233

this works but doesn't modify the visible url

RewriteRule ^play-reel(.*)$ play-reel-new-html5-02.php?director=&video= [L]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme