I followed this tutorial .
What I want to achieve is something like
http://something.com/language/controller/action
But I’m getting
http://something.com/controller/action?language=en&id=1
As far as I know, here is part where URL generation goes. But I can’t figure out how to fix it.
What am I missing?
Use an htaccess file (if you are unfamiliar with htaccess check for a tutorial on google)
add the following lines in it
WIth this rule lets assume you have the domain.com and a user requests the following url
http://www.domain.com/news/December/politics/Titlearticle1
The above rule will break this url request and assign
and
Now in you php script
you could
1) validate the page request
2) explode $_GET[‘request’] to further validate your request
3) validate everything! this is very important or your site might be vulnerable.
like so:
This is some pretty basic concept but you can expand it according to your needs…