Mod_rewrite for MT comments, trackbacks
13 Aug 2003
I changed the URLs of my comments using mod_rewrite tonight. The benefit to using mod_rewrite is that my comment and trackback pages will now be indexed in search engines with greater relevance since the URLs now appear as individual pages rather than Perl generated content.
Comments
- Old URL:
/mt/mt-comments.cgi?entry_id=1237 - New URL:
/comments/1237
Trackback
- Old URL:
mt/mt-tb.cgi?__mode=view&entry_id=1237 - New URL:
/trackback/1237
See how much nicer the new URLs look? If you have mod_rewrite enabled, add this code to your .htaccess file:
RewriteEngine On
RewriteRule ^comments/([0-9]+) mt/mt-comments.cgi?entry_id=$1 [L]
RewriteRule ^trackback/([0-9]+) mt/mt-tb.cgi?__mode=view&entry_id=$1 [L]
4 comments
OH MY GOD!!! New little buttons for the hosted sites. WOOHOO!!!
Heh, glad you enjoy them so much, Matt.
verry interesting!!!
jkjgtjhgtrjjrhgjhtrj and more info D