0
回答
为什么Daux.io 我安装在lnmp中重写规则失败
百度AI开发者大赛带你边学边开发,赢100万奖金,加群:418589053   
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回/261阅
顶部