• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Apache rewrite rule for tags

imthebest

Formerly Super120
#1
Hi,

I have been using [Tinhte] XenTag until 1.4. Now that 1.5 includes tag funcionality, after importing all the tags from that add-on to XF's own tagging system, I'd like to redirect everything from:

Code:
http://www.mysite.com/forums/tags/some+thing -> http://www.mysite.com/forums/tags/some-thing/
http://www.mysite.com/forums/tags/some+thing/ -> http://www.mysite.com/forums/tags/some-thing/

http://www.mysite.com/forums/tags/some+thing+else -> http://www.mysite.com/forums/tags/some-thing-else/
http://www.mysite.com/forums/tags/some+thing+else/ -> http://www.mysite.com/forums/tags/some-thing-else/
Only redirect if after "tags/" there is a plus "+" symbol, otherwise do nothing (because the syntax is the same).

Thanks,
Super120
 
#3
Additionally, a forwarding of the following would be great:
Code:
http://www.mysite.com/forums/tags/?t=some+thing -> http://www.mysite.com/forums/tags/some-thing/
http://www.mysite.com/forums/tags/?t=some+thing/ -> http://www.mysite.com/forums/tags/some-thing/
as XenTag also offers a /tags/?t=some+thing linking for special characters.
 

Jake Bunce

XenForo moderator
Staff member
#6
Off hand, I believe this will require an intermediate PHP script to handle the slug conversion (as opposed to pure rewrite rules).