Changing URL pattern
I'm new to PHP and want to know is there a way that i can make my application effectively understand the url. Usually when I enter the URL http://www/example.com/hello/world, the control usually goes to index page at webroot/hello/world subfolder.
What i wish to know is whether there is a way that the control always goes to index page at webroot , ie, http://www/example.com/index.php and consider the hello/world as GET parameters? It helps me to make a single controller page to decide what to do to a user request. I dont prefer to get a solution in any PHP framework as I've not started learning them.
Yes, with URL rewriting. It looks to the user like they're going to
but it actually works like
or pretty much anything you want. Point is the user doesn't know that's happening.
So, (1) are you using Apache, (2) what do you want the URL to look like to the user, and (3) have you used the $_SERVER array much? The various possibilities are all equally easy to use.
June 25th, 2013, 12:35 AM
Yeah I use Apache server I've not much explored into $_SERVER array till now.
Originally Posted by requinix
I prefer the URL to be like http://www.example.com/hello/world
I dont prefer any index.php or ?query-string on the URL. thank you for your reply