Both User Profiles and Tags have
mod_rewrite rules applied to them. This makes URLs much smaller, and much better for search engines.
Two "rules" generally apply. I know that not everyone will use these best practices but as authors and editors, we can do our best to set a good example.
Rule #1: Don't put spaces in your username or tags.
Rule #2: See Rule #1.
Lets take a look at some examples:
My profile URL looks like this:
http://bgviewsblogs.com/cgi-bin/mtcs/mt-cp.cgi?__mode=view&id=1But after...
http://bgviewsblogs.com/profiles/meancodeNormally Tag search results look like this:
http://bgviewsblogs.com/cgi-bin/mtcs/mt-search.cgi?tag=bg-newsBut after...
http://bgviewsblogs.com/tag/bg-newsIf you use spaces in your username or tags, you get %20 (a URL encoded space) such as this:
http://bgviewsblogs.com/tag/bg%20newsHow this is done:In both cases, User Profiles and Tags, I did not want the results specific to any one Blog ID, so I took
&blog_id=2 out of the rewrites. When I update the templates to use the rewritten URLs, I will omit
&blog_id=2 as well. For the Tags, I will have a global tags page, so I did not want to constrain the results.
In your
.htaccess file, add these lines (Note: there is no line break, it is just displayed on this page as such):
RewriteEngine on
RewriteRule ^profiles/(.*)$ /cgi-bin/mtcs/mt-cp.cgi?__mode=view&username=$1 [L]
RewriteRule ^tag/(.*)$ /cgi-bin/mtcs/mt-search.cgi?tag=$1 [L]You could of course constrain any one of those rules to your liking, adding
&blog_id=2.One small issue:If you notice there is a big difference between the original URL for my profile and the rewritten one (
Original,
Rewritten). For the rewrite I am using
username=$1 and using
username= instead of
id= causes the custom fields to vanish. This is a known issue and I hope it gets resolved quickly.
You can always contact me here: webmaster [at] bgviews [dot] com.