技术解析

小白一个,请教大神帮忙转换下 apache 配置,感谢!
0
2021-05-20 23:43:21
idczone
因为对 nginx 不了解,希望有大大帮忙下感谢~

RewriteEngine On
RewriteBase /cp
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9a-zA-Z]+)$ /index.php?type=$1 [L]
RewriteRule ^([0-9a-zA-Z]+)/(\w+)$ /index.php?type=$1&web=$2 [L]
RewriteRule ^([0-9a-zA-Z]+)/国外服务器(\w+)/(\w+)$ /index.php?type=$1&web=$2&page=$3 [L]
RewriteRule ^([0-9a-zA-Z]+)/(\w+)/(\w+)/(\w+)$ /index.php?type=$1&web=$2&page=$3&pid=$4 [L]
Options -Indexes
这是什么程序?
目测这代码有好多年了,估计搜一下就有。

nginx 原生支持.htdoc

https://winginx.com/en/htaccess

首先百度

来自他提供的链接的结果,似乎很 ok 。感谢+1
location /cp/ {
if (!-e $request_filename){
rewrite ^/cp/([0-9a-zA-Z]+)$ /cp/index.php?type=$1 break;
}
rewrite ^/cp/([0-9a-zA-Z]+)/(\w+)$ /cp/index.php?type=$1&web=$2 break;
rewrite ^/cp/([0-9a-zA-Z]+)/(\w+)/(\w+)$ /cp/index.php?type=$1&web=$2&page=$3 break;
rewrite ^/cp/([0-9a-zA-Z]+)/(\w+)/(\w+)/(\w+)$ /cp/index.php?type=$1&web=$2&page=$3&pid=$4 break;
}

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服