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

XF 1.4 /Forums Folder & Numbers add after URL

Discussion in 'XenForo Questions and Support' started by ActorMike, Apr 9, 2015.

  1. ActorMike

    ActorMike Active Member

    Last edited: Apr 9, 2015
  2. ActorMike

    ActorMike Active Member

    Looks like the posts have a number after them too.
     
  3. Jeremy P

    Jeremy P Well-Known Member

    Those are their IDs, so that the titles can change without messing up existing links, 2 threads can exist with the same title, etc etc. You can actually assign forums a URL slug by editing them in the ACP that will remove the need for the ID to be in the URL, but beware that changing it in the future will break links.

    Also the "/forums/" portion is so it knows what route it's trying to match, in this case it's returning a forum.
     
  4. ActorMike

    ActorMike Active Member

  5. Jeremy P

    Jeremy P Well-Known Member

    You're correct that you won't be able to get the URL to match the original one. You could enter '1955-1966-vintage-ford-thunderbird' to get rid of the .6, but the 'forums/' is there to stay.

    The standard solution for this situation though is to setup 301 redirects in Apache to redirect old URLs to new ones.
     
  6. ActorMike

    ActorMike Active Member

  7. Brogan

    Brogan XenForo Moderator Staff Member

  8. ActorMike

    ActorMike Active Member

    @Brogan I was just there, I don't see anything that applies to our situation. Am I missing something? I used VBSEO so my links don't have the standard forumdisplay.php etc.
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

  10. ActorMike

    ActorMike Active Member

    I was able to import the XML file and it gave me this rule but I just tried it and it didn't work. :-(

    RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
    RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
     
  11. Mike

    Mike XenForo Developer Staff Member

    Do you have the previously mentioned redirects in place as well? Where have you placed the code in your .htaccess file?
     
    ActorMike likes this.
  12. ActorMike

    ActorMike Active Member

    @Mike Thanks that was it! Redirects work now. I was confused. I thought they meant for you to use your actual .php files from the old site! :)
     

Share This Page