Clean Fancy URL Script... HELP
Posted: Thu Dec 28, 2006 12:17 am
feyd | Please use
the only problem is I get a 404 error, is there anyway I can toss some sort of .htaccess in the main dir of my app so it does not look for REAL directories
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
OK I am writing a script for a blogging application. I have designed my site so depending on the URL request, it include()s different content. Here is the beef of it (simplified):Code: Select all
$request = $_SERVER['REQUEST_URI']; //Gets Full URL
$dirs = parse_url($request, PHP_URL_PATH); //Gets all URL Dirs
$url = explode("/", $dirs); //Puts URL Dirs into array $url
if($url[0] == 'FOO'){include('foo.php')}
if($url[0] == 'FOO' && $url[1] == 'BAR'){include('foobar.php')}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]