htaccess的; mod_rewrite的;重定向到文件夹两次

时间:2014-08-22 14:10:27

标签: php html apache .htaccess mod-rewrite

我的主页文件位于example.com/index/中。因此,当我访问example.com时,我会看到example.com/index/中的内容(在网址中没有example.com/index/)

我找到了这个并且它正在运作

RewriteCond %{HTTP_HOST} ^(www.)?example.com$ 
RewriteCond %{REQUEST_URI} !^/index/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index/$1 

RewriteCond %{HTTP_HOST} ^(www.)?example.com$ 
RewriteRule ^(/)?$ index/ [L]

问题:我的域名中有一些项目,我想将它们存储在example.com/live/PROJECT/。所以,当我输入example.com/PROJECT时,我会查找example.com/live/PROJECT中的文件。它在某种程度上与/ index上面的东西相同但是我没有得到它。

有几个小时我试图解决这个问题,但我不知道该怎么做。也许你可以帮助我。

非常感谢你。

0 个答案:

没有答案
相关问题