.htaccess - Wordpress installation in my app/webroot/blog folder of CakePHP -


i have wordpress installation in app/webroot/blog folder of cakephp, access www.example.com/blog/, when enter article loose link, example www.example.com/blog/app/webroot/blog/?p=1

is there solution fix that? think should modify wordpress .htaccess don't know add.

my wordpress .htaccess file is:

<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> 

my cakephp app/.htaccess is

<ifmodule mod_rewrite.c>     rewriteengine on     rewriterule    ^$    webroot/    [l]     rewriterule    (.*) webroot/$1    [l] </ifmodule> 

and cakephp app/webroot/.htaccess is

<ifmodule mod_rewrite.c>     rewriteengine on     rewritecond %{request_filename} !-d     rewritecond %{request_filename} !-f     rewriterule ^ index.php [l] </ifmodule> 

cheers

the way did put wordpress folder inside root, , call /blog.

note isn't going cake's webroot folder, it's putting folder in actual root, alongside /app, /lib, /plugins etc.

then modified root's .htaccess file this:

<ifmodule mod_rewrite.c>    rewriteengine on    rewritebase /     # disable rewriting wordpress blog    rewritecond %{request_uri} ^/blog/ [nc]    rewriterule    (.*) $1    [l]     # normal cakephp rewriting    rewriterule    ^$ app/webroot/    [l]    rewriterule    (.*) app/webroot/$1 [l] </ifmodule> 

this seemed best way separate cake parts of site wordpress parts.

it works me.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -