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

Christian Foster christian.foster at gmail.com
Mon Apr 26 05:17:15 UTC 2010


Yes, that was the initial thought but he would like to keep them in
the same format - having looked through all the rewrite rules I think
it is possible by replacing the 4 digit year to 2, and adding 20 to
the front of the year query variable. He doesn't have anything before
2000.

On Mon, Apr 26, 2010 at 12:31 AM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> 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
>
> _______________________________________________
> 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