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

XF 1.2 What is the full list of routes to modify if moving an installation?

Discussion in 'XenForo Questions and Support' started by Anthony Parsons, Aug 4, 2013.

  1. Anthony Parsons

    Anthony Parsons Well-Known Member

    Is there a list of default routes to add in the event upon upgrade a person wants to now move their file structure out of a folder and into the root?

    I would like to on my main site, as an original VB convert, such things are routing didn't exist and a lot was unknown, so I copied the same structure and routed VB to XF URL's all those years ago.

    Now I would like to move XF to root, but I would like to know every single route that I need to enter for XF to function maintaining the same URL structure.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Why not just move the installation to the root?
     
  3. MattW

    MattW Well-Known Member

    As above, that is all I did, and added the below rewrites in to stop people trying to go back to the forum folder as per @Brogan 's advice

    Code:
            RewriteRule ^forum/(.*)?$ /$1 [L,R=301]
            RewriteRule ^forum$ / [L,R=301]
     
  4. Anthony Parsons

    Anthony Parsons Well-Known Member

    XF is currently installed at /c/ with nothing in root. Root redirects. When I move XF from /c/ to root, all my URL's will change without the /c/ in them.

    Yes, my homepage will change to the root as I don't care about one page, but all forums, threads and pages and well... everything, would be a new URL without the /c/ in it.

    I thought this is what routing would allow a person to achieve. Am I wrong about using the routing system?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Why do you want to keep the root empty and maintain the /c/ in the URLs?

    I am slightly confused as you want to modify the route to remove the /c/ so it appears as if your site is in the root, yet you want to keep the /c/ in the URL?
     
  6. Anthony Parsons

    Anthony Parsons Well-Known Member

    My site is "currently" located in a folder /c/. I would like to move my files back to root, however; I don't want to change my URL structure, it still needs to maintain /c/ in the URL structure for obvious spidering and ranking purposes.

    Is this not what the routing system does? I thought it allows us to change the URL's of our site... so in this instance it would allow me to move my site "from" a folder to root, but still maintain the current URL structure for well... common sense for Google, external links, et cetera.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Oh right, yes, in that case you would move your installation to the root and then modify all of the routes to add /c to them.

    However, why not just set up a simple .htaccess rewrite which would automatically reroute any links already posted? Over time Google will reindex and search results would then reflect the new URL.

    That would be much simpler, quicker and safer - if you were to miss a route for example.
     
  8. Anthony Parsons

    Anthony Parsons Well-Known Member

    This is my question... is it better to use the XF route system to do this, or .htaccess to maintain the structure? If the XF system can do it better than .htaccess, what are the default XF routes a person would enter to ensure ALL default XF structure is captured?

    Which is less intensive on the server with 800 people online? .htaccess can be quite intensive on a server doing this...
     
  9. Mike

    Mike XenForo Developer Staff Member

    If you want everything prefixed, don't move it. The route filters are in no way designed for that.
     
    Anthony Parsons likes this.
  10. Anthony Parsons

    Anthony Parsons Well-Known Member

    Ok, thanks Mike. So .htaccess it is or leave it as is. Thanks...
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    I have split the posts off to a new thread as this is somewhat outside the scope of the guide thread.

    I'm not sure what the full list is off hand - you would need to go through the various pages and note them all down.

    Personally I would just do the move to the root and the .htaccess rewrite.
    I have moved my site three or four times and used .htaccess rewrites to redirect existing links each time with no issues.
     
    Anthony Parsons likes this.
  12. Anthony Parsons

    Anthony Parsons Well-Known Member

    Thanks Brogan... looks like that is the option if I move it back to root after reading Mikes response as well. I thought it might be capable of that task. No issues though... just another option ruled out.
     

Share This Page