Käynnissä

mod_rewrite problem - wordpress & cake php

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. [url removed, login to view]

The proglem is I cannot get the right mod_rewrite rules to make it work nicely. they both also want to have the an [url removed, login to view] 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 ^(.*)$ [url removed, login to view]$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/[url removed, login to view] -f

RewriteRule ^(.*) /home/webapps/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/[url removed, login to view] [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/[url removed, login to view] -f

RewriteRule ^(.*) /home/webapps/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/[url removed, login to view] [L]

</IfModule>

# END WPSuperCache

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /blog/[url removed, login to view] [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

Taidot: Linux, Perl, PHP, Järjestelmänvalvoja

Näytä lisää: cake rewrite, wordpress cakephp, cake htaccess, cakephp wordpress directory, rewritecond cakephp, cakephp wordpress htaccess, cakephp rewrite working, rewritecond cake, cakephp wordpress cookie, wordpress amp, work home rules, wordpress wp, wordpress l, think together, problem wordpress, php live person, cake wordpress htaccess, cakephp wordpress domain, cakephp gzip, wordpress cake together, rewritecondition cakephp, include cakephp wordpress page, cakephp cache encoding, htaccess rewrite cakephp wordpress

About the Employer:
( 116 reviews ) London, United Kingdom

Projektin tunnus: #402883

Myönnetty käyttäjälle:

jocu

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

30 $ USD 1 päivässä
(7 arvostelua)
3.2

2 freelanceria on tarjonnut keskimäärin 40 $ tähän työhön

Pektsekye

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

50 $ USD 2 päivässä
(106 arvostelua)
5.6