Thread: URL in MVC
View Single Post
Old 11-07-2009, 04:16 AM   #1 (permalink)
Killswitch
The Contributor
 
Join Date: Feb 2007
Posts: 64
Thanks: 9
Killswitch is on a distinguished road
Default URL in MVC

I have recently found and began playing around with MVC. I have a basic framework setup, the controller class, model class, an sql class, and so on. A basic app works ( well, I am just printing from the method so... ).

Anyways, the URL structure I was hoping to get "cleaner", as the current /controller/and/so/on/id/4 is not so great. Since I am new to MVC, I was wondering if you can rewrite or use PHP to rewrite these values so a URL of...

/content/view/id/5

Could be turned into...

/content/this-is-some-page

I wasn't quite sure how it would work, if it even could since the URL values are used to determine the methods called and so on.

I know Joomla does something similar, maybe very loosely based on MVC ( haven't checked out the new version ), but was wondering what you guys had to say on the subject?
Killswitch is offline  
Reply With Quote