Need mod rewrite (.htaccess redirect) help

Discussion in 'Programming' started by bernard, Jul 28, 2019.

  1. bernard

    bernard Enthusiast

    135
    33
    +20
    I'm in the process of migrating one of my vB 3.8 forums to Xenforo. I will be importing all the data into a clean install, so the thread and post IDs will remain the same. I need some help with mod rewrite rule(s) that would cover the following:

    Code:
    Old:  www.domain.com/forums/f23/thread-title-1255/
    New:  www.domain.com/threads/thread-title.1255/
    
    Old: www.domain.com/forums/f23/thread-title-1255/index2.html
    New: www.domain.com/threads/thread-title.1255/page-2
    
    Old: www.domain.com/forums/f23/thread-title-1255/index2.html#post60948
    New: www.domain.com/threads/thread-title.1255/post-60948
    /forums/f#/ should become /threads/ (f# could be f23, f18, etc.)
    -threadid should become .threadid

    Ideally, index#.html becomes page-# when there is no post id, but if this is too complicated, I can live with simply ignoring index#.html and redirecting to the first page.

    #postid should become /post-id

    Any help would be greatly appreciated.
     
  2. we_are_borg

    we_are_borg Administrator

    5,304
    1,417
    +2,098
    I would ask Slavink on XF he dealt with them so much.
     
  3. bernard

    bernard Enthusiast

    135
    33
    +20
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.