tags:

views:

32

answers:

1

I've got two legacy codebases that I would like to have living side by side. One is Cake, one is handwritten PHP.

I would like both to be located at www.example.com. I'd like the handwritten PHP to serve any requests in the root directory, but anything else I'd like to go to the cake codebase. I cannot simply put cake in a subdir, because all of the links generated by the cake app are hardcoded to be from the root of the site. So Cake won't work in a separate subdomain.

I'd like to do this because I want to share an SSL cert between the two codebases, so I can't put it on a subdomain (wildcard certs are too pricey).

Any advice?

+3  A: 

CakePHP boot (index.php) is only invoked when Apache can't find a specific file/directory. Because of this, you can install a your non-cake php files in the document root as normal and they will be ignored by cake.

One modification to be made is renaming cake's index.php to something like, cake-index.php. Then in the .htaccess change rewrite rule to match:

RewriteRule ^(.*)$ cake-index.php?url=$1 [QSA,L]
webbiedave
Perfect, just what I was hoping. @pekka thanks for your help as well.
Travis Leleu