tags:

views:

82

answers:

1

Hello,

How can I combine the .htaccess rules for cakephp

RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]

with the following

RewriteEngine On

RewriteCond %{HTTP_HOST} folder.yoursite.com
RewriteRule ^(.*)$ /folder [L]

in other words redirect anything to app/webroot/ except /blog (wich is an exisiting folder with a wordpress installation) and redirect blog.domain.com to the blog subfolder

Thank you very much

A: 

It should work automatically (at least with CakePHP 1.3), it's working for me...

My .htaccess looks like this

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

You should also have a proper .htaccess in your wordpress (or any other application) folder that's not a part of the CakePHP application.

Miljenko Barbir