【发布时间】:2015-01-14 12:33:25
【问题描述】:
我有这个 .htaccess 重写规则
AddDefaultCharset UTF-8
RewriteEngine On
RewriteRule ^(administrator) - [L]
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
和nginx版本重写规则
charset utf-8;
rewrite ^/$ /public/ last;
rewrite /(.*) /public/$1 last;
location ~* ^/(administrator) {
break;
}
当前的 .htaccess 将所有请求重定向到 /public 文件夹,除了 /administrator 请求。 使用 nginx 规则 [domain.tld/rss.php not working] [domain.tld/administrator working] [domain.tld working] [File not found.]
我的应用结构是
.
..
index.php [require public/index.php]
administrator/index.php
public/index.php
public/rss.php
public/css
public/js
【问题讨论】: