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

XF 1.4 Another VB 3.8 (VBSEO) to XF 1.4 Nginx rewrite plea :)

Discussion in 'Installation, Upgrade, and Import Support' started by ichpen, May 15, 2015.

  1. ichpen

    ichpen Well-Known Member

    OK guys,

    Hoping someone has some insights into this.

    Migrating a VB 3.8 forum to another server running XF 1.4.7. Pretty new to XF hence the plea :)

    Would be most appreciative of any help on my rewrites.

    The domain will remain the same, I'm running the new forum off a dedicated IP side by side (so can play around with it). Using Nginx on new server.

    The old forum structure VB3.8 with VBSEO (it's sort of broken so can't access the XML URL files but structure looks standard):



    Forum Pages:


    New Forum (XF 1.4):


    Forum Root is /forums/ and Friendly SEOs enabled:


    Forum Pages:



    I did a test migration/import and it looks like IDs were retained but placed on the tail end of the thread.

    Also a side question, I plan to do a fresh migration (again) by clearing out users/nodes/etc. I'm assuming I can still retain old IDs?

    Appreciate it.
    Last edited: May 15, 2015
  2. ichpen

    ichpen Well-Known Member

    I guess question is can this be achieved with rewrites only? Looks possible or should I go the VB php scripts route . Doesn't appear to be a clear guide for this for nginx.

    @Jake Bunce who appears to be the resident expert here :)

    This sort of works except can't get pages to rewrite correctly:

    location /forums/news/ {
    rewrite /forums/news/([\d]+)-(.+)\.html /threads/$2.$1/ permanent;
    rewrite /forums/news/([\d]+)-(.+)(-\d)\.html /threads/$2.$1/page$3 permanent;
    Last edited: May 16, 2015
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That first rule will match the page links as well. Try putting the page rule first.
  4. ichpen

    ichpen Well-Known Member

    Thanks Jake. Not an expert, just threw this together quickly. Yeah, in hindsight the first will cover me for pages also, it won't match the exact page but will at least give me the same thread which I think is good enough so I'll probably get rid of the second rule entirely.

    Now just need to rewrite the parent forums, define a rule for every forum and it should be good enough without resorting to scripts and hopefully not too taxing on the server as we're not crawling through every location. Anything I'm missing?
    Last edited: May 16, 2015
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try this to cover all forum slugs:

            location ~* ^/forums/(news|anotherforum|andanother|another)/ {
                    rewrite /forums/[^/]+/([\d]+)-(.+)\.html /threads/$2.$1/ permanent;
                    rewrite /forums/[^/]+/([\d]+)-(.+)(-\d)\.html /threads/$2.$1/page$3 permanent;
    You just need to name them all in the first line.
  6. ichpen

    ichpen Well-Known Member

    Much appreciated Jake.

Share This Page