Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

htaccess to redirect mobile devices



9:19 pm on Mar 30, 2008 (gmt 0)

5+ Year Member

I'm trying to find a way using htaccess to redirect some mobile devices like nokia symbian, iphone to a specific url.

Is it possibile using htaccess?
If yes what's the rewriterule I should use?

Thank you in advance


6:44 pm on Apr 4, 2008 (gmt 0)

5+ Year Member

I'd be interested in this too, anyone have any suggestions?


7:11 pm on Apr 4, 2008 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Here's a BEGINNING for you to play with.
There will be more options and restrictions required.

You do need to ask yourself some questions?
How are you going to prevent loops and a long list of existing pages that are non-compatible with these phones from being requested?

My own first inclination is to restrict these phones to a specific directory/folder.

Somebody else will need to assist with the above, as well as complicated regex which will catch all pages that are non-phone.!

RewriteCond %{HTTP_USER_AGENT} (nokia¦symbian¦iphone¦blackberry) [NC]
RewriteCond %{REQUEST_URI} !^/Phone\.html$
RewriteRule !^(page4\.html¦page2\.html¦/folder/page1\.html¦OtherFolder/page1\.html)$ [mydomain.com...] [L]


Featured Threads

Hot Threads This Week

Hot Threads This Month