Results 1 to 1 of 1
I have issues in setting up the htaccess rules to redirect my to the inner pages in mobile. I want to redirect all pages in my website to get redirected ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-27-2012 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 4
Htaccess is not redirecting to inner pages in Mobile
I have issues in setting up the htaccess rules to redirect my to the inner pages in mobile. I want to redirect all pages in my website to get redirected to mobile site when accessing through a mobile device.
What is working is : Redirect index page correctly in mobile devices.
What is not working is : If we take hxxp://MY-SITE/Contact-Us page in mobile device, it is going to the actual site. We need to go to mobile device homepage in this scenario.
Here is the htaccess file we are currently using:
I have experimented many rules but the output was a failure.#Redirect Mobile Users
RewriteCond %{REQUEST_URI} !^/Mobile-Landing-Page/.*$
# if the browser accepts these mime-types, it's definitely mobile, or pretending to be
RewriteCond %{hxxp_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR]
# a bunch of user agent tests
RewriteCond %{hxxp_USER_AGENT} "sony|symbian|nokia|samsung|mobile|windows ce|epoc|opera" [NC,OR]
RewriteCond %{hxxp_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR]
RewriteCond %{hxxp_USER_AGENT} "blackberry|ericsson,|panasonic|philips|sanyo|shar p|sie-"[NC,OR]
RewriteCond %{hxxp_USER_AGENT} "portalmmm|blazer|avantgo|danger|palm|series60|pal msource|pocketpc"[NC,OR]
RewriteCond %{hxxp_USER_AGENT} "smartphone|rover|ipaq|au-mic,|alcatel|ericy|vodafone\/|wap1\.|wap2\.|iPhone|android"[NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ /Mobile-Landing-Page/ [L,R=302]
If any one have an idea about how it will implement. Please share.
Thanks,
Arun S


Reply With Quote
