[_] Any Apache PHP Wizards?
Sam Machin
sam at bs8.org.uk
Thu Jan 3 13:25:43 GMT 2008
Hi Ben, Have tried it that way but it tried to find a page named /sam and when it doesn't find it it returns a 404 instead of loading index.php, hence why I hacked the 404 page. The /user/sam works as there's a page called /user, I guess there might be a way to force the default page to always load insead of returning the 404. Rgds Sam On 1/3/08, Ben Butterfield <Ben.butterfield at propellondon.com> wrote: > Not sure about the mod rewrite stuff, but if you have managed to get > foo.com/user/sam to pass the username variable to user.php, couldn't you > just pass the username variable to index.php and then handle > appropriately? > > -----Original Message----- > From: Sam Machin [mailto:sam at bs8.org.uk] > Sent: 03 January 2008 13:16 > To: underscore at under-score.org.uk > Subject: [_] Any Apache PHP Wizards? > > Hi _ > > I'm trying to build a site/service and I want to be able to have > usernames ulrs, e.g. http://foo.com/sam > > I've worked out how to pass parameters as slashes in the URL eg > foo.com/user/sam where user is a php script but I'd like to do it on > the top level. > > Currently I've defined a custom 404 page in .htaccess and I'm using > the $_SERVER['REDIRECT_URL'] variable to get the username. > > However I'm rather aware that hacking the 404 isn't really an ideal > solution, anybody know how to do it properly? > > FYI I'm running apache1.3 on a MacOSX box and I've got root access. > > Rgds > Sam > > -- > underscore_ list info/archive -> > http://www.under-score.org.uk/mailman/listinfo/underscore > > -- > underscore_ list info/archive -> http://www.under-score.org.uk/mailman/listinfo/underscore >