0
回答
为什么Daux.io 我安装在lnmp中重写规则失败
滴滴云服务器,限时包月0.9元,为开发者而生>>>   
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但是重写也没有起作用
举报
兆前
发帖于3年前 0回/250阅
顶部