I have a small problem that is driving me nuts. I think it will be pretty simple for the right person to solve.
I am trying to make
cakephp and Wordpress/">
wordpress (also
php) live together on a single domain e.g. www.mysite.com
The proglem is I cannot get the right mod_rewrite rules to make it work nicely. they both also want to have the an index.php in the same directory which is also causing problems.
Here is my cake .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$ 1 [QSA,L]
</IfModule>
and here is
Wordpress/">
wordpress<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
blog/
AddDefaultCharset UTF-8
RewriteCond %http://www.mistersoft.org/freelancing/getafreelancer/2009/03/Linux-Perl-CGI-PHP-System-Admin-mod_rewrite-problem-wordpress-amp-cake-php-402883.html !^.*[^/]$
RewriteCond %http://www.mistersoft.org/freelancing/getafreelancer/2009/03/Linux-Perl-CGI-PHP-System-Admin-mod_rewrite-problem-wordpress-amp-cake-php-402883.html !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|
Wordpress/">
wordpress|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/home/webapps/
Wordpress/">
wordpress/wp-content/cache/supercache/%{HTTP_HOST}/
blog/$ 1/index.html.gz -f
RewriteRule ^(.*) /home/webapps/
Wordpress/">
wordpress/wp-content/cache/supercache/%{HTTP_HOST}/
blog/$ 1/index.html.gz [L]
RewriteCond %http://www.mistersoft.org/freelancing/getafreelancer/2009/03/Linux-Perl-CGI-PHP-System-Admin-mod_rewrite-problem-wordpress-amp-cake-php-402883.html !^.*[^/]$
RewriteCond %http://www.mistersoft.org/freelancing/getafreelancer/2009/03/Linux-Perl-CGI-PHP-System-Admin-mod_rewrite-problem-wordpress-amp-cake-php-402883.html !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|
Wordpress/">
wordpress|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/home/webapps/
Wordpress/">
wordpress/wp-content/cache/supercache/%{HTTP_HOST}/
blog/$ 1/index.html -f
RewriteRule ^(.*) /home/webapps/
Wordpress/">
wordpress/wp-content/cache/supercache/%{HTTP_HOST}/
blog/$ 1/index.html [L]
</IfModule>
# END WPSuperCache
# BEGIN
Wordpress/">
WordPress<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /
blog/index.php [L]
</IfModule>
there are only a small number of controllers that I need to get to the cake app e.g. keywords, users, reports, and they are distinct from the slugs used by
Wordpress/">
wordpress.
Please can someone provide for me a working .htaccess file or explain what I need to do to fix.
thanks
Michael
and