[Catalyst] RE: Using Catalyst Instead of Rewrite Rules

Duncan Garland Duncan.Garland at motortrak.com
Tue Feb 7 17:38:52 GMT 2012

I think we can write a flexible enough re-write rule after all. Thanks.

From: Duncan Garland [mailto:Duncan.Garland at motortrak.com]
Sent: 07 February 2012 12:24
To: The elegant MVC web framework
Subject: [Catalyst] Using Catalyst Instead of Rewrite Rules


We've got a little process which is mostly php scripts.

However, there's a requirement to do some url re-writing. The user should see www.site/user/london<http://www.site/user/london> and www.site/user/glasgow<http://www.site/user/glasgow> instead of www.site/user.php?site=london<http://www.site/user.php?site=london> etc.

Re-write rules in a webservers are error prone and difficult to maintain. It seems to me that we should get Catalyst to field the original calls and pass the appropriate parameters to the php scripts.

However, it's not as obvious as I thought because a simple redirect will display the GET parameters in the browser address bar which is what we are trying to avoid. How should it be done? It's calling the PHP which is bothering me, not the interpreting of the URL by Catalyst.

(I don't have the option of re-writing the project as a proper Catalyst app.)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120207/87edd748/attachment.htm

More information about the Catalyst mailing list