vicos
Member
Just finished our upgrade from vb 4.2.3-->XF1.5-->XF2.1
During import, I had it keep the Content IDs the same, in addition to the archive log.
When I got to 2.1 I tested the XF Redirect for vB AddOn. It wasn't working. Thought it might be since we were using SEO friendly links in vB.
Anyway, I removed that and just added some rewrites to .htaccess
Works great, EXCEPT when someone creates a new thread where the title begins with a numeric [0-9], it return an error message when trying to redirect the user to the new thread. The thread is actually created though.
Here are some sample URLs:
vB LINK: https://testforum.mysite.com/threads/264103-new-years-resolutions
XF LINK: https://testforum.mysite.com/threads/new-years-resolutions.264103/
What the URL looks like when title begins [0-9+]:
Appreciate any assistance on this one.
P.S. Here's the complete rewrite in .htaccess so you have the whole picture:
During import, I had it keep the Content IDs the same, in addition to the archive log.
When I got to 2.1 I tested the XF Redirect for vB AddOn. It wasn't working. Thought it might be since we were using SEO friendly links in vB.
Anyway, I removed that and just added some rewrites to .htaccess
Code:
# redirects for vB4.2. Content IDs are the same.
RewriteRule ^threads/([0-9]+)-.*$ /threads/$1/ [R=301,L]
RewriteRule ^forums/([0-9]+)-.*$ /forums/$1/ [R=301,L]
RewriteRule ^members/([0-9]+)-.*$ /members/$1/ [R=301,L]
RewriteRule ^external\.php\.*$ /forums/-/index\.rss [R=301,L]
# END
Works great, EXCEPT when someone creates a new thread where the title begins with a numeric [0-9], it return an error message when trying to redirect the user to the new thread. The thread is actually created though.
Here are some sample URLs:
vB LINK: https://testforum.mysite.com/threads/264103-new-years-resolutions
XF LINK: https://testforum.mysite.com/threads/new-years-resolutions.264103/
What the URL looks like when title begins [0-9+]:
Appreciate any assistance on this one.
P.S. Here's the complete rewrite in .htaccess so you have the whole picture:
Code:
<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}]
# DSN: redirects for vB4.2. Content IDs are the same.
RewriteRule ^threads/([0-9]+)-.*$ /threads/$1/ [R=301,L]
RewriteRule ^forums/([0-9]+)-.*$ /forums/$1/ [R=301,L]
RewriteRule ^members/([0-9]+)-.*$ /members/$1/ [R=301,L]
RewriteRule ^external\.php\.*$ /forums/-/index\.rss [R=301,L]
# END
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>
Last edited: