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

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

Hi,

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.)

Thanks

Duncan
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to