Guys and Gals i have a vBulletin forum and I am having some issue with our tag clouds.

currently the tag link looks like this

But we want to get it like this /tags/green-data-center.html

So I have used this

RewriteRule ^tags\.php\?tag=(.+)$ tags/$1.html

but there seems to be no effect. pls tell me how to get this work?

Member Avatar


RewriteEngine On
RewriteRule ^tags/([^/]*)\.html$ /tags.php?tag=$1 [L]

will give /tags/green+data+center.html

I'm not sure how to replace + with - though.

However, I did come across this for replacing a space with an underscore:

RewriteCond %{REQUEST_URI} ^(.*)\ (.*)$
RewriteRule ^.*$ %1_%2 [E=space_replacer:%1_%2]
RewriteCond %{ENV:space_replacer} !^$
RewriteCond %{ENV:space_replacer} !^.*\ .*$
RewriteRule ^.*$ %{ENV:space_replacer} [R=301,L]

Perhaps you could modify this? Not sure wether it would replace all instances though