【发布时间】:2015-02-13 10:41:19
【问题描述】:
这是我的项目结构:
htdocs
-abs (project)
- apps
-----admin
-----pc
-----client
-----Common
- webroot
-----htaccess (1) (for pc)
-----index.php (for pc)
-----admin
--------htaccess (2)
--------index.php
-----client
--------htaccess (3)
--------index.php
.htaccess (1) 内容:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
htaccess (2 & 3) 内容:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
当我通过以下端口访问时:
没关系。
但是当我不通过端口访问时:
重定向到
http://localhost/abs/webroot/admin
我想从
中删除“webroot”http://localhost/abs/webroot/admin
我该怎么做?谢谢!
【问题讨论】: