Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disable CakePHP rewrite routing for a single folder so it can be used as a location for a second application?

I have a cakephp installation in the root of my domain. Now it turns out I need to put another app in there that will reside in a subdirectory. How do I disable the controller/model redirection in cake for just this directory?

The current .htaccess in the root folder looks like this:

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

I've tried modifying it like this, but to no avail:

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

I am aware that this is a bit of a hack, but there's no way I can get the second app to play nice with cake.

like image 587
grapefrukt Avatar asked Jun 25 '09 14:06

grapefrukt


1 Answers

Deizel's answer didn't work for me, but placing the following RewriteRule above the two cakephp rules did:

RewriteRule ^bildbank - [L]
like image 158
GaZ Avatar answered Sep 28 '22 15:09

GaZ