Options -Indexes
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^$ 2012/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/2012%{REQUEST_URI} -f
RewriteRule .* 2012/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* 2012/index.php$0 [QSA] #<-- this is wrong here, and gives 500 error
我正在尝试从 2012 子文件夹中提供我所有的网址。
我尝试了上面的脚本,但它对于以下网址失败了:
index.php/admin/controller/action?id=123
应该从子文件夹中解决
2012/index.php/admin/controller/action?id=123
怎么了?