Return to Snippet

Revision: 4768
at January 22, 2008 13:22 by eszpee


Updated Code
RewriteEngine On
RewriteRule ^tag/?$ /browse.html [L]
RewriteRule ^tag/(.*)$ /mt/mt-search.cgi?tag=$1&blog_id=1&IncludeBlogs=1 [L]
RewriteRule ^mt-static(.*)$ - [L]
RewriteRule ^(.*)_(.*)$ $1-$2 [N]

Revision: 4767
at January 20, 2008 14:15 by eszpee


Initial Code
RewriteEngine On
RewriteRule ^tag/?$ /browse.html [L]
RewriteRule ^tag/(.*)$ /mt/mt-search.cgi?tag=$1&blog_id=1&IncludeBlogs=1 [L]
RewriteRule ^(.*)_(.*)$ $1-$2 [N]

Initial URL


Initial Description
list the exceptions where you don't want to replace in the rewrite rules before the one that matches the underscore, and finish them with [L], otherwise they'll get replaced too.

[N] means rerun the whole replacing stuff once the line matched... careful with that.

Initial Title
Replace _ with - in almost every url (plus nice tag urls in movabletype)

Initial Tags
replace, htaccess

Initial Language
Apache