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

XF 1.1 Index redirection question

Discussion in 'XenForo Questions and Support' started by Robert F Schmitz, Jun 5, 2012.

  1. Robert F Schmitz

    Robert F Schmitz Well-Known Member

    I had the portal set as index.php and the forum then became index.php?forum. I want to return the forum as index.php but folks have booksmarks that point to the index.php?forum. How can I redirect (rewrite?) the index.php?forum >>>index.php?
  2. Chris D

    Chris D XenForo Developer Staff Member

    Rob Fritz likes this.
  3. Robert F Schmitz

    Robert F Schmitz Well-Known Member

    When I disable the portal, /tlc3/index.php becomes the forum home. I had a bookmark to the forum page while the portal was set as the index controller and that link was /tlc3/index.php?forum.

    After disabling the portal and with the forum set as /tlc3/index.php, that old bookmark throws an error, The requested page could not be found.
  4. ragtek

    ragtek Guest

    so you want to have /index.php?forum to redirect permanently to /index.php?
  5. Robert F Schmitz

    Robert F Schmitz Well-Known Member

  6. ragtek

    ragtek Guest

    Here's an add-on which overwrites the standard xenforo error page if the path is "forum" and redirects it to the forum index page:)

    I'm not sure about the SEO effect (i'm using XenForo_ControllerResponse_Redirect::RESOURCE_CANONICAL_PERMANENT and response code 301)

    Attached Files:

    Rob Fritz likes this.
  7. Robert F Schmitz

    Robert F Schmitz Well-Known Member

    I will give that a shot tonight. Thanks ragtek.
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    While not normally used for this purpose, this addon also works for backwards route changes like this:


    Screen shot 2012-06-05 at 5.52.45 PM.png

    "forum" (which doesn't exist) is mapped to "index" (which does exist). So when some one visits "forum" it loads the index. And because "index" is canonicalized in XF it will actually redirect the URL to "index".
    Rob Fritz likes this.

Share This Page