Question Problem with the URLs

Status
Not open for further replies.

mpursell

Customer
Product it's the latest version installed:

I haven't found a proper way to get these two rewrite rules work on a same .htaccess

There was a migration on this site that made it work from www.site.com to www.site.com/forums/

And to make that migration work fine, there're two scripts, one does a redirection from the old URLs within a synced new URL ID, and the second one are rules from a SEO suite on the software.

So, I'm stuck making both work fine, can you help me?

#Rule 1 Start
# If this one is enabled, the second one doesn't work and viceversa
RewriteEngine On
RewriteCond %{QUERY_STRING} board=([0-9]+)
RewriteRule index\.php vbseo301.php?action=forum&oldid=%1 [L]

RewriteCond %{QUERY_STRING} ^board=([0-9]+)\.([0-9]+)
RewriteRule index\.php vbseo301.php?action=forum&oldid=%1 [L]


RewriteCond %{QUERY_STRING} topic=([0-9]+)
RewriteCond %{QUERY_STRING} ^topic=(.*)\.([0-9]+)$
RewriteRule index\.php vbseo301.php?action=thread&oldid=%1 [L]

RewriteCond %{QUERY_STRING} ^topic=([0-9]+)
RewriteRule index\.php vbseo301.php?action=thread&oldid=%1 [L]

RewriteCond %{QUERY_STRING} ^topic=(.*)\.([0-9]+)$
RewriteRule index\.php vbseo301.php?action=thread&oldid=%1 [L]

RewriteCond %{QUERY_STRING} ^topic=(.*)\.msg([0-9]+)$
RewriteRule index\.php vbseo301.php?action=post&oldid=%1 [L]

RewriteCond %{QUERY_STRING} action=profile;u=([0-9]+)
RewriteRule index\.php vbseo301.php?action=user&oldid=%1 [L]
#Rule 1 Ends

#Rule 2 Start
# 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|index\.php|reviewpost/|classifieds/|photopost/)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ dbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/(index\.php)/
RewriteCond %{REQUEST_FILENAME} !/(admincp|dbseocp|modcp|clientscript|cpstyles|images|reviewpost|index\.php|classifieds|photopost)/
RewriteRule ^(.+)$ dbseo.php [L,QSA]
#Rule 2 Ends
 
So I'm to understand you've imported to vB from another software, and you're needing to make old URLs redirect to their vB equivalents?

I would recommend putting the "Rule 1" sets in a .htaccess file in the parent folder, and Rule 2 sets in a separate file in the /forums/ folder.
 
Status
Not open for further replies.

Legacy DragonByte SEO

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
7,172
Customer rating
5.00 star(s) 1 ratings
Back
Top