[wp-hackers] Customising date based URLs to use a 2 digit year

Mike Schinkel mikeschinkel at newclarity.net
Sun Apr 25 14:31:44 UTC 2010


Have you considered doing 301 redirects from the old format to the new format?  If viable you can do that in the .htaccess file or using the "template_redirect" hook by sniffing $_SERVER['REQUEST_URI'].

-Mike

On Apr 25, 2010, at 8:55 AM, Christian Foster wrote:

> Hi all,
> 
> I have been a bit stumped by this and can't find a solution anywhere -
> a potential client wants to move from Moveable Type to Wordpress. His
> MT urls are in the format http://site.com/YY/MM/DD and he posts one
> post per day (always!).
> 
> Does anyone know if there a way for Wordpress to
> a) use a 2 digit year instead of 4 and
> b) get wordpress to pick up the post for that date on the single day
> URL instead of showing the single day archive (My thoughts are to
> write a custom template for the daily archive and change the query to
> pick up the 1 post for that day)?
> c) remove the normal wordpress URL for the individual posts? My
> initial thoughts are to filter the permalinks to point to the date of
> the post.
> 
> Regards,
> 
> Christian.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list