[typo] Permalink Structure

Scott Laird scott at sigkill.org
Thu Dec 1 20:52:41 EST 2005


FWIW, the current Typo trunk can do this, if you fill out the  
'redirects' table correctly.  We need to document it and add it to  
the converters before 4.0.


Scott

On Dec 1, 2005, at 4:47 PM, Mike Purvis wrote:

> Hi Kevin,
>
> I was moving from a hand-rolled blogging system to Typo. Because of my
> Ruby inexperience, I did my permalinks using a simple PHP redirect. I
> recommend this approach. Basically, you want a single RewriteRule in
> your .htaccess file, which will funnel the old requests into a PHP  
> file.
> The PHP file will then access the database, look up the date, and
> construct the correct "new" link, and forward the browser there.
>
> To see it in action, try hitting
> http://uwmike.com/archive/proper-forwarding and you can see that  
> you end
> up redirected to the MT/Typo-style permalink:
> http://uwmike.com/articles/2005/10/05/proper-forwarding
>
> Your htaccess rule would be like this:
>
> RewriteRule ^([0-9]+)/(.*)/?$ /redirect.php?id=$1&name=$2 [QSA,L]
>
> If you'd like the PHP source of the redirection file, just drop me a
> line off-list. (or, perhaps one of the gurus here can share the Railsy
> way to do it that doesn't break on upgrades...)
>
> Mike
>
>
> facedown at mac.com wrote:
>
>> I've setup a test install of Typo, imported everything from WP, and
>> have it ready to go except for one thing. On my WP blog, I'm using
>> the following permalink structure:
>>
>> domain.tld/post_id/post_name/
>>
>> I don't want to break incoming links and need to find a way to keep
>> old links working in order to go live with the Typo install. I've
>> found config/routes.rb and assume I might be able to set something in
>> there to route visitors correctly, but don't know how to go about it.
>>
>> I really don't care about the final structure. IOW, if it's easier to
>> keep the Typo install using the articles/year/mo/day/post_name/
>> structure while redirecting those who come in on the old links,
>> that's okay. I'm not too concerned about links to category or date
>> archives—only links to individual articles.
>>
>> I appreciate any help you can offer. I've spent much of this
>> afternoon searching the Typo site, reading through the list archives,
>> and searching Google, but don't know that I've hit on the right
>> keywords, yet. If this has been written about elsewhere, I would
>> appreciate the link.
>>
>> Thanks,
>> Kevin
>> _______________________________________________
>> Typo-list mailing list
>> Typo-list at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/typo-list
>>
>>
>
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list




More information about the Typo-list mailing list