复制代码 代码如下:
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^Mozilla//5/.0.*
RewriteRule index.phpindex.m.php
RewriteCond %{HTTP_USER_AGENT} ^Lynx.*
RewriteRule index.phpindex.L.php
RewriteRule index.phpindex.b.php
复制代码 代码如下:
if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/5.0')
{
//跳转到对index.m.php的访问
}
else if($_SERVER['HTTP_USER_AGENT'] == 'Lynx')
{
//跳转到对index.L.php的访问
}
else
//跳转到对index.b.php的访问
复制代码 代码如下:
RewriteCond %{REMOTE_HOST} ^host1.* [OR]
RewriteCond %{REMOTE_HOST} ^host2.* [OR]
RewriteCond %{REMOTE_HOST} ^host3.*
RewriteRule (.*)$ test.php
新闻热点
疑难解答