1. 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

Discussion in 'XenForo Questions and Support' started by imthebest, Aug 14, 2015.

  1. imthebest

    imthebest Formerly Super120


    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:

    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).

    pecadm likes this.
  2. imthebest

    imthebest Formerly Super120

  3. pecadm

    pecadm Member

    Additionally, a forwarding of the following would be great:
    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.
  4. imthebest

    imthebest Formerly Super120

    Any idea would be more than welcome!
  5. imthebest

    imthebest Formerly Super120

  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

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

Share This Page