htaccess到nginx规则

时间:2014-10-26 00:15:50

标签: .htaccess nginx

我有一个.htaccess文件,我无法转换。

.htaccess文件的内容:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and other folders,
RewriteCond $1 !^(index\.php|login|images|img|js|css|public|data|simplepie|application|system|cache)
RewriteRule ^(.*)$ index.php/$1 [L]

Nginx:

location /  {
try_files $uri $uri/ index.php$is_args$args;
rewrite ^system.* index.php/$1 break;
if (!-e $request_filename){
rewrite !^(index\\.php|login|images|img|js|css|public|data|simplepie|application|system|cache) index.php/$1 break; 
}

任何帮助将不胜感激。 感谢

0 个答案:

没有答案