2012-04-14 63 views
0

這裏是我的文件夾結構htaccess的重寫索引文件夾到PHP文件

test 
-.htaccess 
-app 
--index.php 

我想,當我去http://localhost/test/,它改寫測試/應用/ index.php文件(無重定向)

我的htaccess下面。現在它工作正常與url http://localhost/test/some/thing。使用URL http://localhost/test/,它仍然顯示文件夾測試

<IfModule mod_rewrite.c> 
RewriteBase /test/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /test/app/index.php [L] 
</IfModule> 

回答

0

重寫規則中的正則表達式表示的文件索引,因此不會使您的點的任何字符匹配?你有沒有試過這個:

RewriteRule ^/$ app/index.php [L] 
+0

它不工作.... – complez 2012-04-15 01:26:29