Apache ';nginx重写&x27;至';。htacces重写&x27;
我在regexps中很差,但在服务器配置中我最差。 所以任何帮助都是有用的 在nginx配置中有这样的功能Apache ';nginx重写&x27;至';。htacces重写&x27;,apache,nginx,rewrite,Apache,Nginx,Rewrite,我在regexps中很差,但在服务器配置中我最差。 所以任何帮助都是有用的 在nginx配置中有这样的功能 location / { rewrite ^(.*[^/])$ $1/ permanent; try_files $uri $uri/ /index.php?$args; } 需要同样的东西。 泰。他们应该证明非常相似 <IfModule mod_rewrite.c> RewriteEngine On # Your web directory
location / {
rewrite ^(.*[^/])$ $1/ permanent;
try_files $uri $uri/ /index.php?$args;
}
需要同样的东西。
泰。他们应该证明非常相似
<IfModule mod_rewrite.c>
RewriteEngine On
# Your web directory root
RewriteBase /
#Make sure it's not a specific file or directory that they're trying to reach
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*[^/])$ index.php?args=$1 [NC, L]
</IfModule>
重新启动发动机
#您的web目录根
重写基/
#确保他们试图访问的不是特定的文件或目录
重写cond%{SCRIPT_FILENAME}-F
重写cond%{SCRIPT_FILENAME}-D
重写规则^(.*[^/])$index.php?args=$1[NC,L]
这将: