XF 1.5 DBSEO vb3 redirect help needed please.

viper357

Well-known member
Hi everyone, I am currently on vb 3.8.5 and have DBSEO installed, I need some help with rewrites for htaccess I believe.

This is what my current url's look like for threads:

Code:
http://www.marineaquariumsa.com/general-discussions/63267-sump-advice-please.html

What do I need to add to my htaccess for the urls to rewrite? My Xenforo will be installed in a folder at /forums Thanks for the help. :)

Also, will I need to leave the DBSEO stuff in the htaccess file? This is what is in there at the moment...

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^marineaquariumsa.com$ [NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ http://www.marineaquariumsa.com/$1 [R=301,L]`

RewriteEngine On

# If you are having problem with "None Could Be Negotiated" errors in Apache, uncomment this to turn off MultiViews
# Options -MultiViews

RewriteCond %{REQUEST_URI} !(admincp/|dbseocp/|modcp/|cron|mobiquo|forumrunner|api\.php)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ dbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|dbseocp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ dbseo.php [L,QSA]
 
The old DBSEO rules can be removed.

Add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

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

That will redirect the thread URLs.

With redirects in the web root and XF in a subdirectory you might need to set the RewriteBase in XF's .htaccess file to avoid conflicts.
 
Thank you very much Jake, appreciate that.
With redirects in the web root and XF in a subdirectory you might need to set the RewriteBase in XF's .htaccess file to avoid conflicts.
I don't quite understand that. The rewrite rules go into my old .htaccess file in the root, what must I do to XF's .htaccess file?
 
Oh wait, do you mean this bit? Do I just need to change this?
Code:
#  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
 
I've been on XF for just over 2 months now. How long should I leave the rewrite rules in place? Are they ok to stay there indefinitely or is there some kind of timeframe after which they should be removed?
 
It depends whether you want old links (Google, posted on other sites, etc.) to redirect or 404.

Google can take a significant amount of time to reindex.
Links posted on other sites will generally never be updated to the new URLs.
 
Back
Top Bottom