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

后端 未结 3 465
佛祖请我去吃肉
佛祖请我去吃肉 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:52

    I have simmilar setup, that my cake app is in subdirectory, my root .htaccess has this rewrite rule:

    RewriteRule ^cakephp/(.*)$ /cakephp/$1 [L,QSA]
    

    All the rest is handled with the regular cakephp setup.

    my /cakephp/app/webroot/.htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
    

    hope this works for you too :)

提交回复
热议问题