Clean URLs in MVC

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

god crap. i didn't know i just got page 3 pwnage. that's why i didn't see it lmao!

my bad
Last edited by MrPotatoes on Fri Jul 28, 2006 10:06 pm, edited 2 times in total.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

balls, i figured i posted here. i hope i didn't post in another thread by mistake

anyways, i did figure it out. i used some of the code from above (just to clear everything out with the '/') and i got it into a one function thinga-ma-bobber

i'm tired. this isn't going to get any better. i'm running on 10 hours of sleep for this week. sweet

anyways, i got this into one file and it reads and makes the URL, checks and cleans the GPC and i grab it via the sections. it's sweet as hell. it's not complicated at all. honestly if you map your URLs ahead of time it's like working with a regular query string but looks alot better. so you really jjust index your params instead of doing a GET thingy.

if ($url[0] == 'forums') -> goto forums :D

i can also work with multiple params within the URL. it's sweet. you should try it :D
Post Reply