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

XF 1.1 URL Redirect (vB 3.8 with vBSEO to XF)

Discussion in 'Installation, Upgrade, and Import Support' started by MsJacquiiC, Sep 10, 2012.

  1. MsJacquiiC

    MsJacquiiC Well-Known Member

    So I've read a few threads regarding URL redirects. I'm a bit confused. But here are the specifics of how I completed the migration:

    1. vB w/ vBSEO was installed on my main domain.
    2. XF was installed in another directory.
    3. Once XF was installed and import complete - I placed the vB in another directory located at http://jpicforum.info/OLDvB3/forum/
    4. I then moved XF to the main domain http://jpicforum.info
    So I've followed the instructions listed at Redirection Scripts for vBulletin 3.x to no avail. Perhaps because I modified the directories...? IDK

    But can someone please advise as to how I can accomplish the redirection of my old vB 3 urls to my new XF url structure? I'd certainly appreciate it! A step-by-step would be sweetness :D


  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In your case:

    1) Upload those redirect scripts to your "main domain" (where vB was, and where XF now is).

    2) Add rewrite rules to your .htaccess file to map the vBSEO URLs to the redirect scripts. This site will give you appropriate rewrite rules:


    That should do it.
  3. MsJacquiiC

    MsJacquiiC Well-Known Member

    Thanks for your kind response Jake! I've a couple issues actually.

    1. I'd used subdreamer cms to power the homepage. It was integrated into vBulletin database. So the vB script was actually installed in the /forum folder.
    2. I now use xenPorta with the "Set as Index Controller" setting activated.

    So I'm not sure I can place the redirect scripts into "forum" folder. When I do - obviously the forum doesn't show.

    Can you suggest a work-around for this issue please?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You could use this addon to change the index route:


    You will see there is a note about XenPorta at the bottom. You can use a different route instead of "forum" which will avoid the conflict with your redirects.

    Another option would be to manage your redirects without the /forum directory by setting up some rewrite rules to capture the old /forum URLs of a specific format (ie threads, forums, etc). The redirect scripts would then go into your web root, and the rewrite rules would be added to XenForo's .htaccess file, something like this:

    #	Mod_security can interfere with uploading of content such as attachments. If you
    #	cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #	SecFilterEngine Off
    #	SecFilterScanPOST Off
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteRule ^forum/[^/]+/([\d]+)-.+-([\d]+)\.html /showthread.php?t=$1&page=$2 [NC,L]
    	RewriteRule ^forum/[^/]+/([\d]+)-.+\.html /showthread.php?t=$1 [NC,L]
    	#	If you are having problems with the rewrite rules, remove the "#" from the
    	#	line that begins "RewriteBase" below. You will also have to change the path
    	#	of the rewrite to reflect the path to your XenForo installation.
    	#RewriteBase /xenforo
    	#	This line may be needed to enable WebDAV editing with PHP as a CGI.
    	#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    	RewriteCond %{REQUEST_FILENAME} -f [OR]
    	RewriteCond %{REQUEST_FILENAME} -l [OR]
    	RewriteCond %{REQUEST_FILENAME} -d
    	RewriteRule ^.*$ - [NC,L]
    	RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    	RewriteRule ^.*$ index.php [NC,L]
    MsJacquiiC likes this.
  5. MsJacquiiC

    MsJacquiiC Well-Known Member

    Wow! I'm more designer than coder.... I'm quite sure I wouldn't have been able to get this redirect thing correct without your assistance Jake! I used the 2nd option above and voila! Success = Thanks so very much for your assistance dude!
    Jake Bunce likes this.
  6. MsJacquiiC

    MsJacquiiC Well-Known Member

    Okay - one final question if I might. Having visited the xFSEO vBSEO rewrite script -- I'm told the forum url rewrite is an unsupported format. So I want to redirect manually.

    For instance - What was http://jpicforum.info/forum/jpic-forum-rules/ should now redirect to http://jpicforum.info/link-forums/jpic-forum-posting-policy.91/

    Here's the contents of my .htaccess file as it is now:

    The redirects work just fine. But - Is this format correct as is?
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Looks good.
  8. MsJacquiiC

    MsJacquiiC Well-Known Member

    Thank you!

Share This Page