XF 1.4 Help redirect vBSEO URLs to XF URLs

dotpro

Active member
Hi,

I migrated one of my forums to XF today and urgently need help redirecting the OLD vBSEO links to new URLs.

The forum and thread URLs from vb4.x looked like this:
http://www.forumname.com/forum-one/
http://www.forumname.com/forum-one/this-is-thread-title-1001.html

I am using
Shorter Routes by Waindigo to get rid of /forum or /topics in the URL.

I've tried to look up the information but info around redirection is scattered all over the place in bits and pieces. I would appreciate it if someone can help with what needs to go in .htaccess.

thanks
 
Mike,

thank you. I was able to configure the forum links manually. I installed the vbredir add-on and from the geekpoint tool generated this:

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

But adding that to .htaccess redirects the thread pages to forum homepage.
 
My .htaccess file looks like this:

Code:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteCond %{SERVER_PORT} !^443$

RewriteCond %{HTTPS}  off
RewriteRule ^(.*)$ https://www.myforum.com/$1 [R=301,L]


Redirect 301 /old-node-name /old-node-name.f2/


#       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
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
        RewriteEngine On

        #       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]
</IfModule>


When old links come in from google, it redirects to something which looks like this:

https://www.myforum.com/node-name.f8//thread-title-here-1455.html

I would really appreciate it if someone can help me figure out what is wrong here. I would hate to lost over 9 years of links!!!
 
Regarding the links redirecting to the index page, that would generally indicate they are hitting the redirects, but you need to setup 301config.php (specifically pointing to your import log).

In terms of using the "Redirect" directive, note that anything matched after the URL will be maintained at the target URL. Since your threads are "children" of your forum, you need to ensure that's sorted first. You have to use mod_rewrite for that so as such, you may need to use mod_rewrite to redirect your forum URLs (http://www.greywyvern.com/?post=358) but it's worth checking that (make sure the browser isn't giving you cached results).
 
Mike,

thank you for the help. I've fixed the issue. HOwever, the redirects still have the node-name.f8 in the URL along with double // how can I omit that?

301config.php is setup with it pointing to the import log
 
I'm not clear what you've changed and what's still happening, but you may need to use mod_rewrite for all redirects as discussed in the link in my previous post to be able to control the order in which redirects are processed.
 
Thanks but I figured it out. I was mistaking default name for import log in 301config but when i checked the database, it has different name than what xenforo install recommends "archived_import_log" not "import_log_old"
 
Top Bottom