大神帮忙转个伪静态
<IfModule mod_rewrite.c>RewriteEngine on
RewriteEngine on
RewriteCond %{HTTP_HOST} ^baidu.com
RewriteRule ^(.*)$ http://www.baidu.com/$1
RewriteCond %{HTTP_HOST} ^((?!www|m).)(.*).baidu.com
RewriteRule ^(.*)$ http://www.baidu.com/$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1
</IfModule>
能不能帮忙转成nginx的 谢谢了 软件直接转的,你试试
if ($http_host ~ "^baidu.com"){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite ^/(.*)$ http://www.baidu.com/$1 permanent;
}
if ($http_host ~ "^((?!www|m).)(.*).baidu.com"){
set $rule_1 1$rule_1;
}
if ($rule_1 = "1"){
rewrite ^/(.*)$ http://www.baidu.com/$1 permanent;
}
if (!-d $request_filename){
set $rule_2 1$rule_2;
}
if (!-f $request_filename){
set $rule_2 2$rule_2;
}
if ($rule_2 = "21"){
rewrite ^/(.*)$ /index.php/$1 last;
}
VMSir 发表于 2017-3-23 23:01
软件直接转的,你试试
dalao 求软件 好像有个软件的,名字一时半会想不起来了。 location / {
if ($http_host ~ "^baidu.com"){
rewrite ^(.*)$ http://www.baidu.com/$1 redirect;
}
if ($http_host ~ "^((?!www|m).)(.*).baidu.com"){
rewrite ^(.*)$ http://www.baidu.com/$1 redirect;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php/$1 break;
}
} 本帖最后由 jiajieit 于 2017-3-24 06:36 编辑
有在线转的网站
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
http://www.winginx.com/en/htaccess
页:
[1]