为什么Daux.io 我安装在lnmp中重写规则失败

兆前 发布于 2015/03/19 11:27
阅读 261
收藏 0
RewriteEngine On
#RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !.(gif|jpg|png|css|js|html|ico|zip|rar|pdf|xml|mp4|mpg|flv|swf|mkv|ogg|avi|woff|svg|eot|ttf|jar)$ index.php [L,QSA]

手来我就转成nginx的了并添加到/usr/local/nginx/conf/json.conf中
location / {

if (!-f $request_filename){
        set $rule_0 1$rule_0;
}
if (!-d $request_filename){
        set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
        rewrite /!.(gif|jpg|png|css|js|html|ico|zip|rar|pdf|xml|mp4|mpg|flv|swf|mkv|ogg|avi|woff|svg|eot|ttf$
}

}

并在虚拟空间中添加 include json.conf;  重启nginx但是重写也没有起作用
加载中
返回顶部
顶部