开发者

How detect browser with .htaccess

开发者 https://www.devze.com 2023-03-10 21:48 出处:网络
I want detect user browsers with .htaccess &开发者_JS百科 redirect when user does not entered the site from cell phoneYou can start here with an example.

I want detect user browsers with .htaccess &开发者_JS百科 redirect when user does not entered the site from cell phone


You can start here with an example.

# Rewrite requests from all user-agents except modern Internet Explorer, Firefox, Opera
RewriteCond %{HTTP_USER_AGENT} !^Mozilla/4\.[0-9]+\ \(compatible;\ MSIE\ [0-9.]+
RewriteCond %{HTTP_USER_AGENT} !^Mozilla/5\.0 \(([^;]+;\ )*[^;]+\)\ Gecko/2[0-9]{3}\ Firefox/[0-9.]+
RewriteCond %{HTTP_USER_AGENT} !^Opera/[0-9.]+
RewriteRule .* X.html [L]

Adjust as necessary.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号