Hi
I need help with my URL handling as I think my current method is not the best way to do it and understand preg_match would be?
I am building a small website and when the user hits the root of the domain (www.mydomain.com) I redirect the user as follows:
if ($url == "" || $url == "blue") {
header('location: http://www.mydomain.com/blue/home');
}
So in the address bar at the top they see this URL and I deal with that request using the REQUEST_URI global array etc.
However (!) I am aware that preg_match would accomplish a similar outcome?
If this is so, could someone jot a bit of code down that would redirect my users to a_page.php if the last part of the URL was /blue/home ?
Thanks for any help provided