Hello,
What I'd do is something like :
Router::connect(
'/:cheeseSlug:cheeseSuffix',
array('controller' => 'cheeses', 'action' => 'view'),
array(
'cheeseSlug' => '[^/]+',
'cheeseSuffix' => '-cheese.html',
'pass' => array('cheeseSlug')
)
);
This should load your CheeseController::view() methods with the given
slug as first parameter.
On Jul 10, 4:06 pm, Si <[email protected]> wrote:
> We have a website with flat content setup like so:
>
> /cheese/red-leicester
> /cheese/cheddar
>
> We want to change these URLs to something like:
>
> /red-leicester-cheese.html
> /cheddar-cheese.html
>
> How can this be done with Route::connect? I know it can be done
> with .htaccess rewrite rules but I'd prefer to contain the logic
> within Cake.
> This isn't a generic preference sitewide, simply for this "cheese"
> section.
>
> Any advice welcomed.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---