forked from jayallen/melody
-
Notifications
You must be signed in to change notification settings - Fork 36
Melody Cookbook: SEO friendly tag urls
mikert edited this page Feb 27, 2011
·
1 revision
Using Apache mod_rewrite, you can redirect URLs like domain.com/tags/blogging to the search system. The following is an example of how to do that. It goes in a ".htaccess" file stored at the root of your site's domain ("http://www.yourdomain.com/") and assumes Melody is installed in a directory named "melody." Change the last line to the correct name for your installation of Melody if it is different. (Side note: if you are using fastcgi, you will also need to change search.cgi to search.fcgi)
RewriteEngine On
RewriteBase /
RewriteRule ^printer-friendly/(.*)$ $1?printerfriendly=1 [L]
RewriteRule ^tag/(.*)$ melody\/search\.cgi\?IncludeBlogs=x,y,z\&tag=$1\&limit=20
Include whatever blog IDs would want to be searched where you see x,y,z. Put this in the htaccess file at the root of the domain.