Project Detail

mod_rewrite problem - wordpress & cake php  

mod_rewrite problem - wordpress & cake php is project number 402883
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: jocu

Budget: $30-250

Created: 03/16/2009 at 14:11 EDT

Bid Count: 2

Average Bid:
$ 40

03/21/2009 at 14:11 EDT

Project Creator: oxjemly
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (63 reviews)

Bid On This Project
 

Description

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 (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
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
AddDefaultCharset UTF-8
RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/home/webapps/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz -f
RewriteRule ^(.*) /home/webapps/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz [L]

RewriteCond %{REQUEST_URI} !^.*[^/]$
RewriteCond %{REQUEST_URI} !^.*//.*$
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} !.*=.*
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/home/webapps/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html -f
RewriteRule ^(.*) /home/webapps/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html [L]
</IfModule>

# END WPSuperCache

# BEGIN 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.

Please can someone provide for me a working .htaccess file or explain what I need to do to fix.

thanks
Michael

and

Messages Posted:0 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

50

2 days

03-16-2009 14:34 EDT

you should change the script to make the wordpress urls to differ from the cake php urls. Then you can use this difference to make the htaccess work

help

 

30

1 day

03-17-2009 03:57 EDT

Hello, I've got thorough experience with mod_rewrite and with WordPress, I can help you to fix this problem quickly.

help


    Bid on this Project