2014-01-11 52 views
0

我有一个CakePHP备份,我想在本地xampp设置上进行设置。我从它运行平稳的服务器备份它。当我想使用localhost打开时,它显示/ app/webroot /目录列表。仅在cakephp设置中列出目录

我使用Windows 7与xampp。我已经开始mod_rewrite了。

我的.htaccess文件有

<IfModule mod_rewrite.c> 
    RewriteEngine on 
    RewriteRule ^$ app/webroot/ [L] 
    RewriteRule (.*) app/webroot/$1 [L] 
    DirectoryIndex /front/default.php 
</IfModule> 

回答

0

有些事情不对在文档中。你的.htaccess应该是这样的:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule^index.php [L] 

+0

我粘贴的根.htaccess文件。 /应用程序/根目录具有 RewriteEngine叙述在 的RewriteCond%{REQUEST_FILENAME}!-d 的RewriteCond%{REQUEST_FILENAME}!-f 重写规则^(。*)$的index.php [QSA,L]

0

试试这个代码:

DirectoryIndex index.php 
RewriteEngine on 
RewriteRule ^(.*)$ app/webroot/$1 [L] 
+0

我用这个,但现在显示空白页面。 –

+0

立即查看更新的代码。以上.htaccess文件的位置是什么? – anubhava