Đã hoàn thành

htaccess detect mobile and redirection with cookie

I need a code in my htaccess that do this:

1) Detect mobile browser and redirect, like this:

if is mobile, redirect from [url removed, login to view] to [url removed, login to view]

or [url removed, login to view] to [url removed, login to view]

Always redirect to home, I don't need equivalent urls.

Actually I do this with this code:

RewriteCond %{REQUEST_URI} !^/m/.*$

RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]

RewriteRule ^(.*)$ /m/ [L,R=302]

2) But, I also need a url that go from mobile version to normal site, and this not possible with the code that I use. Because always redirect to mobile version.

It's possible do theses two things only with htacces?

If there is other way , welcome.


3) Finally, you must tell me where put the code (if we use another way to htaccess). I will use code in html website and joomla website.

Kĩ năng: PHP

Xem nhiều hơn: htaccess redirect cookie mobile, htaccess detect mobile, www t mobile.com, www t mobile com, where's my android, t mobile android, t . mobile, opera android, m mobile site, mobile redirection cookie, webOS, theses, joomla android, htaccess, go mobile, detect mobile, mobile html redirect code, detect php, browser detect, cookie htaccess, detect browser redirect, html mobile redirect code, redirect htacces, website browser mobile, php htaccess

Về Bên Thuê:
( 2 nhận xét ) Chillán, Chile

ID dự án: #1698291

Được trao cho:


can do it with alternate method. check pm

$30 USD trong 1 ngày
(0 Đánh Giá)

3 freelancer đang chào giá trung bình $30 cho công việc này


Hi, I am sending you a message in a sec. Kind Regards

$30 USD trong 0 ngày
(257 Nhận xét)

Professional web developer is ready get started right now. Please read my private message for more information.

$30 USD trong 2 ngày
(87 Nhận xét)

Hi, I sent a pm.

$30 USD trong 1 ngày
(43 Nhận xét)