Re: User-friendly URI's
| From: | Mike Eheler | Date: | Fri, 04 Jan 2002 00:08:21 +0000 |
| Subject: | Re: User-friendly URI's | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79399@lists.php.net to get a copy of this message | ||
A 404 ErrorDoc would still reply with a 404 code, which could mess up some search engines.
I was thinking of the .htaccess solution, but I'm not sure if that's possible to force only certain files or perhaps all files in just a certain directory to all be application/x-httpd-php?
I guess that would be the best solution. :)
Or would it? What if I have an images/ subfolder.. I certainly wouldn't want all my images being thrown through PHP. That could cause some ugliness. So I guess it would have to be un-doable. Is it?
Mike
Jason Murray wrote:
"news" would actually be a PHP script, of course. I know how to handle /2002/01/02/keyword as parameters, my question is on making "news" be interpreted through PHP.Off the top of my head... You could either use a .htaccess to force Apache to recognise "news" as a PHP script, or you could use a Custom 404 page to figure out what the heck the original URL was trying to get at and silently substitute in the resulting page. A Custom 404 might be easier, but would have a bit more supporting infrastructure at the code end for a big site. Apologies if this is incorrect, I just may not be thinking too clearly today :) Jason