[UPHPU] URL Rewriting

Mac Newbold mac at macnewbold.com
Mon Apr 28 18:49:05 MDT 2008


Today at 6:16pm, velda said:

> Mac Newbold wrote:
>> Apr 22 at 10:11am, Richard K Miller said:
>> 
>>> I'm not sure you could do *any* URL rewriting without at least a bare 
>>> minimum of mod_rewrite.
>> 
>> <trim>How to use custom php error pages to generate dynamic code</trim>
>
> Would that still send error numbers in the header though? If so, wouldn't our 
> googlebots and  other spider friends be confused?

Ah, good catch, Velda! I forgot to mention how you take care of that. PHP 
can change what HTTP response code Apache sends back like this:

header("HTTP/1.0 200 OK\n");

Or for a redirect:

header("HTTP/1.0 $status Moved Forever");

where status is 301, or in the case of stupid browsers that won't display 
an HTML page when the status is 301, you may want to leave it a 404. But 
for google and such, 301 does exactly what you'd hope for on a redirect.

Thanks,
Mac

--
Mac Newbold		MNE - Mac Newbold Enterprises, LLC
mac at macnewbold.com	http://www.macnewbold.com/


More information about the UPHPU mailing list