AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] 这个是 apache 的 静态规则 改成 nginx 的怎么改 |
|
---|---|
ad19880102 |
ad19880102 发表于 2013-10-31 17:02:18
<IfModule mod_rewrite.c>
RewriteEngine on RewriteCond %{REQUEST_FILENAME} ^(.*(data|tmp|log).*\.php)$ RewriteRule .*$ – [F,L] RewriteCond %{REQUEST_FILENAME} ^(.*(assets|themes|data).*\.(css|png|js|jpeg|gif|jpg))$ RewriteRule .*$ $0 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
点赞,加油! (0分)
2013-10-31 17:02:18 1
|
894849635 |
if ($request_filename ~ "^(.*(data|tmp|log).*.php)$"){
set $rule_0 1$rule_0; } if ($rule_0 = "1"){ return 403; break; } if ($request_filename ~ "^(.*(assets|themes|data).*.(css|png|js|jpeg|gif|jpg))$"){ set $rule_1 1$rule_1; } if ($rule_1 = "1"){ rewrite /.*$ /$0 last; } if (!-f $request_filename){ set $rule_2 1$rule_2; } if (!-d $request_filename){ set $rule_2 2$rule_2; } if ($rule_2 = "21"){ rewrite ^/(.*)$ /index.php/$1 last; }
回复
2013-10-31 22:15:02 2
|
ad19880102 |
回复
2013-11-01 11:01:29 3
|
kuika |
if ($request_filename ~ "^(.*(data|tmp|log).*.php)$"){
set $rule_0 1$rule_0; } if ($rule_0 = "1"){ return 403; break; } if ($request_filename ~ "^(.*(assets|themes|data).*.(css|png|js|jpeg|gif|jpg))$"){ set $rule_1 1$rule_1; } if ($rule_1 = "1"){ rewrite /.*$ /$0 last; } if (!-f $request_filename){ set $rule_2 1$rule_2; } if (!-d $request_filename){ set $rule_2 2$rule_2; } if ($rule_2 = "21"){ rewrite ^/(.*)$ /index.php/$1 last; }
回复
2013-11-01 13:50:12 4
|
kuika |
恩 实验了下 网上是能直接转换的
回复
2013-11-01 13:50:35 5
|
kuika |
回复
2013-11-01 13:51:32 6
|