XF 1.4 VB 4.2.2 & VBSEO 3.6.0 to XF - URL Redirection Issues

Donny

Active member
Hi all,

Really struggling 301 URL's from VBSEO to XF.

I've ported over a big board to XF and I'm struggling with a redirect (tried a combination of all available) to get URL's in this format: http://www.domain.com/forum-name/95805-thread-name.html (001 I believe the setting is called in VBSEO)

To 301 to XF.

I've actually done this half a dozen times before but the most recent was about 18 months ago so I haven't the bloody foggiest how I did it. I've even tried copying my old htaccess and 301redirect.php files etc and the vb4redir add-on available in resources. And have also tried the tool here http://tools.geekpoint.net/xfseo/ and I'm really stuck now.

And starting to get worried.

We have 1.2m posts and 100,000 threads I don't want to be able to not 301!

Can anybody actually help me with what is working currently?
I've added the scripts, found the location of my log file from the import, added that to the 301redirect.php, edited the htaccess (various ways), tried with and without full path to the forum URL (commented it out and tried, then uncommented it and tried).

Tried a couple of versions of the actual redirect scripts.

Can't seem to fathom how I've done this before, or how to do it again!

A fellow admin in need lads! Please help!
 
Oops, I actually missed that in your post.

Do any of the URLs redirect correctly or do they all 404?

It should just be a case of using the redirection script/rules and the vbseo rewrite rules added to the top of the XF .htaccess file.
 
We use cloudflare, so they're 404ing but not sure if that's interfering. I'm sure I had that running 18 months ago too when I did the last forum.

I thought it was super easy too to be fair. I wouldn't have been able to do it before if it was a minefield.

Seems I manually 301'd all my forum categories before, something I will do again easily, but I somehow managed to get one of the scripts working quite a few times. But not this bloody one. It's the biggest forum I have too.

And I have one more with 800k posts to do, and daren't do it without knowing I can do this again. It's not something I could test (or that i knew how to) on my test transfers I did a few times. Obviously needed to be the live site kinda thing. Or so I thought.

I keep erasing all the scripts and files and htaccess and starting again but I've been on it about 30 hours now and am tired and hungry but daren't stop trying lol

Don't suppose you guys know anybody I could pay, or offer some link love too or something, in return for them sorting it, no doubt in seconds?!
 
Stuart Wright (avforums) is on my forum (coincidentally) and we got chatting years ago, he's helped me with a couple of things. He said Jake helped him with his URL's. And I went back in my PM's to 2013 and found he'd helped me with mine too back then. But it seems he's obviously busy or something.
 
Can you show the full .htaccess you've used to do the redirections (that isn't working)? (It's worth confirming that you're running Apache; if you're running something else, you'll need a different approach for 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
#</IfModule>

RewriteEngine On
RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /threads/$1/ [R=301,L]

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 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>
 
Top Bottom