Jump to content
zerious

URL Redirection to mobile Website

Recommended Posts

zerious    1
zerious

Hi,

 

I'm using the iBlog Pro Theme and want to redirect smartphone devices to a mobile website instead of the responsive design. I'm using the following code in the htaccess and have the problem that the redirection doesn't work. 

 

RewriteCond %{REQUEST_URI} !^/mobile/.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ /mobile/ [L,R=302]

 

Is there a possibility to deactivate the responsive design or give the htaccess redirect a higher priority than the responsive design?

Share this post


Link to post
Share on other sites
Simon    247
Simon

Try this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^$ /mobile/ [L,R=302]
</IfModule>

Share this post


Link to post
Share on other sites
zerious    1
zerious

Hi,

 

I've tried the htaccess rule yesterday but there is no effect on the redirect.

 

I also tried the plugin above and a few others. No redirection plugin seems to work with iBlog Pro. It looks like if the responsive layout will overrule all the redirection stuff.

 

Can you help me with that problem?

Share this post


Link to post
Share on other sites
Rob    547
Rob

Hi Zerious,

 

Simon is our senior developer and incredibly knowledgeable with .htaccess.  I'm unsure how he'd resolve this issue, but I'd recommend you consider hiring a pro for this from http://www.pagelines.com/pros.

 

I will alert Simon to this topic.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Simon    247
Simon

.htaccess and url redirection is handled by your server configuration.

 

If redirection is not working at all then you need to contact your host and tell them the apache module rewrite is either not installed or configure incorrectly.

Share this post


Link to post
Share on other sites
zerious    1
zerious

Hi,

 

htaccess is supported by the server, e.g. for permalinks it works without any problems. And I also had a mobile redirection plugin aktivated that works, but only for the homepage. For subpages it always ends with a redirection loop, that's why I want to have a solution with htaccess. The plugin Rob posted is not working in any way.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

If you disable PageLines Framework and enable Twenty Ten, Eleven or Twelve, does the same issue apply, where it works on your homepage but not other pages, can you confirm this please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×