Routing offsite

2009-09-25 Thread leo

I have built a simple storefront that bolts onto an existing php
website. The CakePHP application (the store) includes the dynamic menu
from the existing CMS. The urls in the menu are relative, e.g.
href=publications.html and all have the '.html' extension.

I need to route these pages to outside of Cake, but it's Friday and I
can't see how to do it with the router.

Would I be better doing it in .htaccess? Eventually, the CMS will be
rewritten in CakePHP, so there isn't really any mileage in rewriting
the legacy code.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Routing offsite

2009-09-25 Thread leop

Okay, sorted. I did it this way:

RedirectMatch ([A-Za-z0-9-]+)\.html$ http://website.co.uk/$1.html

I used the alphanum regexp instead of (*.) in order to drop the cake
webroot portion of the URL, i.e. only return the portion after the
final '/'


On 25 Sep, 12:12, leo ponton@gmail.com wrote:
 I have built a simple storefront that bolts onto an existing php
 website. The CakePHP application (the store) includes the dynamic menu
 from the existing CMS. The urls in the menu are relative, e.g.
 href=publications.html and all have the '.html' extension.

 I need to route these pages to outside of Cake, but it's Friday and I
 can't see how to do it with the router.

 Would I be better doing it in .htaccess? Eventually, the CMS will be
 rewritten in CakePHP, so there isn't really any mileage in rewriting
 the legacy code.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---