[wp-hackers] mod_rewrite help
mikeschinkel at newclarity.net
Sun Jul 19 17:44:46 UTC 2009
Very nice! Thanks for educating me and others on this best practice.
WordPress Custom Plugins
On Jul 19, 2009, at 12:17 PM, Matt Mullenweg wrote:
> On 7/18/2009 10:29 PM, Mike Schinkel wrote:
>> Oops, that one line should have been ($path, not $$path):
>> header('Location:' . $url_paths[$path],true,301);
> For extra points, use wp_redirect:
> It works on IIS and Apache, and also with different PHP setups that
> a regular header() call won't.
> It's also more secure, the URLs are sanitized and run through KSES
> to disallow header splitting attacks.
> See also:
> Matt Mullenweg
> http://ma.tt | http://wordpress.org | http://automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers