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

XF 1.4 Redirecting router filter link?

Discussion in 'XenForo Questions and Support' started by Benas223, Mar 11, 2016.

  1. Benas223

    Benas223 Member

    Hello, so I have a route filter "pages/live" to "live/". How do I redirect abc.com/live to another router filter "/pages/watch" -> "watch"?

    So if someone goes to abc.com/live they get redirected to abc.com/watch?

    Thanks in advance!
  2. Mike

    Mike XenForo Developer Staff Member

    I'm a little confused, because you're already redirecting pages/live to live/, so you can't really redirect live/ to something else. Can you clarify?
  3. Benas223

    Benas223 Member

    Basically my old users are used to just typing in .com/live, but i want to change it to .com/watch.

    So incase any old users still type in url .com/live, I would need them to be redirected to the new page .com/watch.
  4. Mike

    Mike XenForo Developer Staff Member

    I assume you've already changed the existing route filter (or will), but when you do that, create a new one with:

    Find route: watch/
    Replace route: live/
    Enable "Incoming URL conversion only"

    (With incoming only it looks backwards, but it will do what you want.)
  5. Benas223

    Benas223 Member

    @Mike hey Mike, still a bit confused myself here with routing and redirecting. I currently have 1 route:
    Find route"pages/watch"
    Replace with "watch/"

    How do I do so when a user types in "www.example.com/live" he gets redirected to the new watch page url (www.example.com/watch )?
  6. Mike

    Mike XenForo Developer Staff Member

    That's what my previous example should have done (though it may require a trailing slash, you may be able to remove both of them but I'm not positive).
  7. Benas223

    Benas223 Member

    So I added a second route like you said:
    Find Route: live/
    Replace With: watch/
    Incoming URL conversion only Enabled

    When typing in www.example.com/live
    The requested page could not be found.

    Is there no simple code to put in EXTRA.css that would redirct .com/live to .com/watch?
  8. Benas223

    Benas223 Member

    Last edited: Apr 6, 2016

Share This Page