.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
Post a Comment