Set up CakePHP in a subdirectory; Wordpress is installed in the root

后端 未结 3 430
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 01:18

I have been searching for a solution for 2 hours but nothing seems to work... here is my problem:

I have WordPress installed in the root (var/www). So by going to http:

3条回答
  •  北海茫月
    2021-01-21 01:46

    thanat's answer almost worked for me. i just had to edit the RewriteBase to read

    RewriteBase /cakephp
    

    and make sure apache conf allowed my root directory to override its previous options

    
    AllowOverride All
    
    

    but then again, my app dir lies outside the DocumentRoot set by apache. and the cakephp dir is actually the webroot itself. so my dir structure is as follows

    /my/root
    /my/root/app  #cake's app dir without webroot
    /my/root/dir  #apache DocumentRoot (your wordpress is here)
    /my/root/dir/cakephp  #cake's webroot
    

    also make sure to edit /my/root/dir/cakephp/index.php so it knows where the app and cake's library dirs are.

提交回复
热议问题