doushuichong2589 2015-03-29 04:43
浏览 50
已采纳

CakePHP:重命名文件夹时获取空白页面

I am working on a cakephp project locally then when I'm uploading it to the remote server I upload it as "projectName-new". And after doing some tests it is renamed to "projectName" and after renaming the original "projectName" to "projcetName-old".

However after renaming the new one from "projectName-new" to "projectName" I'm getting a blank page. but when I rename it back or rename it to any other name than "projectName" I can view it properly, also when I rename the "projectName-old" to "projectName" I can view that project properly.

I thought it might be something with the .htaccess but there's nothing weird in the file. Any ideas to why this might be happening?

  • 写回答

2条回答 默认 最新

  • dtc9222 2015-03-29 23:16
    关注

    Eventually it was something in the .htaccess, I changed the following:

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

    And removed the $1 to be:

    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteRule    ^$ app/webroot/    [L]
       RewriteRule    (.*) app/webroot/ [L]
    </IfModule>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?