Image redirect for mobile version
4 posts
• Page 1 of 1
Image redirect for mobile version
hi, i want redirect all request for the image in mysite, like this domain.com/public/normal/img.jpg to domain.com/public/mobile/img.jpg , if the request come form a mobile device.
I have inserted an .htaccess file in /public/ path with this code:
but it not work.
Any ideas?
Thanks
I have inserted an .htaccess file in /public/ path with this code:
- Code: Select all
RewriteEngine on
RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC]
RewriteRule ^public/normal/(.*)$ public/mobile/$1 [R=301,L]
but it not work.
Any ideas?
Thanks
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Image redirect for mobile version
hello,
Have you tried using User-Agent variable instead, as described in examples section?
Regards
Andrew
Have you tried using User-Agent variable instead, as described in examples section?
Regards
Andrew
Re: Image redirect for mobile version
Thanks, i have found a tool online with the lists of user-agent for mobile. This is the link http://detectmobilebrowsers.com/
- tidaltides
- Posts: 24
- Joined: 27 Nov 2012, 21:57
Re: Image redirect for mobile version
Does this tool really help? I don't know where to start.
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests