PDA

View Full Version : vBulletin fix VBSEO redirects 404 after disabling the plugin/product



Fli
02-15-2022, 09:54 AM
After disabling VBSEO in vbulletin admincp / Manage products, maybe the links on the forum does not work.
One have to also remove rewrite rules from .htaccess file:


# vBSEO
#RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
#RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
#RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
#RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

#RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php)
#RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
#RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
#RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
#RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
#RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
#RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
#RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
#RewriteRule ^(.+)$ vbseo.php [L,QSA

Old URLs will not be working.

You can now choose new user/seo friendly URLs in admincp / Options / Friendly URLs, i have selected Basic Friendly URLs.



Standard URLs:
showthread.php?t=12345
Basic Friendly URLs:
showthread.php?1234-Thread-Title
Advanced Friendly URLs:
showthread.php/1234-Thread-Title
Mod Rewrite Friendly URLs:
threads/1234-Thread-Title



To make old URLs redirect to new ones. These .htaccess rules worked (was added to same place as above mentioned vbseo rewrite rules):

If you have your thread rewrite rules set as forum-name/threadid-threadname.html use the following .htaccess
Code:

RewriteEngine on
RewriteRule [^/]+/([0-9]+)-[^/]+\.html /forums/showthread.php?t=$1 [L,R=301]

If you have your thread rewrite rules set as forum-name/threadname-threadid.html use the following .htaccess
Code:

RewriteEngine on
RewriteRule [^/]+/[^/]+-([0-9]+)\.html /forums/showthread.php?t=$1 [L,R=301]

If you have your thread rewrite rules set as forum-name/threadname-threadid/ use the following .htaccess
Code:

RewriteEngine on
RewriteRule [^/]+/[^/]+-([0-9]+)/ /forums/showthread.php?t=$1 [L,R=301]

If you have your thread rewrite rules set as forum-name/threadid-threadname/ use the following .htaccess
Code:

RewriteEngine on
RewriteRule [^/]+/([0-9]+)-[^/]+ /forums/showthread.php?t=$1 [L,R=301]

(note that /forums/ should be removed if your forum is under domain.com not on domain.com/forum/)

Old forum URLs redirect possibly impossible to make working if it does not contain forum ID. I have used following inside .htaccess:


RedirectMatch 301 (?i)^/vbcms-comments/?$ /forumdisplay.php?3-vbcms-comments
RedirectMatch 301 (?i)^/internet-life/?$ /forumdisplay.php?66-internet-life
RedirectMatch 301 (?i)^/Introductions/?$ /forumdisplay.php?2-Introductions
RedirectMatch 301 (?i)^/general-talk/?$ /forumdisplay.php?4-general-talk
RedirectMatch 301 (?i)^/internet/?$ /forumdisplay.php?74-internet
RedirectMatch 301 (?i)^/Making-money/?$ /forumdisplay.php?55-Making-money
RedirectMatch 301 (?i)^/money-making-opportunities/?$ /forumdisplay.php?57-money-making-opportunities
RedirectMatch 301 (?i)^/ecurrencies-payment-processing/?$ /forumdisplay.php?59-ecurrencies-payment-processing
RedirectMatch 301 (?i)^/exchange-currencies/?$ /forumdisplay.php?60-exchange-currencies
RedirectMatch 301 (?i)^/scammers/?$ /forumdisplay.php?62-scammers
RedirectMatch 301 (?i)^/google/?$ /forumdisplay.php?67-google
RedirectMatch 301 (?i)^/adsense/?$ /forumdisplay.php?70-adsense
RedirectMatch 301 (?i)^/analytics/?$ /forumdisplay.php?71-analytics
RedirectMatch 301 (?i)^/gmail/?$ /forumdisplay.php?69-gmail
RedirectMatch 301 (?i)^/chrome/?$ /forumdisplay.php?125-chrome
RedirectMatch 301 (?i)^/youtube/?$ /forumdisplay.php?68-youtube
RedirectMatch 301 (?i)^/file-sharing/?$ /forumdisplay.php?126-file-sharing
RedirectMatch 301 (?i)^/Social-networks/?$ /forumdisplay.php?75-Social-networks
RedirectMatch 301 (?i)^/social-networks-offers-requests/?$ /forumdisplay.php?94-social-networks-offers-requests
RedirectMatch 301 (?i)^/facebook/?$ /forumdisplay.php?72-facebook
RedirectMatch 301 (?i)^/twitter/?$ /forumdisplay.php?76-twitter
RedirectMatch 301 (?i)^/Computers-technology/?$ /forumdisplay.php?5-Computers-technology
RedirectMatch 301 (?i)^/linux-forum/?$ /forumdisplay.php?133-linux-forum
RedirectMatch 301 (?i)^/mobile-phones/?$ /forumdisplay.php?115-mobile-phones
RedirectMatch 301 (?i)^/security/?$ /forumdisplay.php?123-security
RedirectMatch 301 (?i)^/hardware/?$ /forumdisplay.php?124-hardware
RedirectMatch 301 (?i)^/webmaster-forum/?$ /forumdisplay.php?6-webmaster-forum
RedirectMatch 301 (?i)^/general-webmaster-discussion/?$ /forumdisplay.php?65-general-webmaster-discussion
RedirectMatch 301 (?i)^/Html-css-javascript-coding-programming/?$ /forumdisplay.php?7-Html-css-javascript-coding-programming
RedirectMatch 301 (?i)^/wts-wtb-programming-services/?$ /forumdisplay.php?43-wts-wtb-programming-services
RedirectMatch 301 (?i)^/html-css-forum/?$ /forumdisplay.php?9-html-css-forum
RedirectMatch 301 (?i)^/php-mysql-forum/?$ /forumdisplay.php?97-php-mysql-forum
RedirectMatch 301 (?i)^/python-forum/?$ /forumdisplay.php?100-python-forum
RedirectMatch 301 (?i)^/perl-forum/?$ /forumdisplay.php?99-perl-forum
RedirectMatch 301 (?i)^/java-forum/?$ /forumdisplay.php?101-java-forum
RedirectMatch 301 (?i)^/javascript-forum/?$ /forumdisplay.php?122-javascript-forum
RedirectMatch 301 (?i)^/net-forum/?$ /forumdisplay.php?98-net-forum
RedirectMatch 301 (?i)^/c-forum/?$ /forumdisplay.php?103-c-forum
RedirectMatch 301 (?i)^/c-forum/?$ /forumdisplay.php?102-c-forum
RedirectMatch 301 (?i)^/bash-shell-forum/?$ /forumdisplay.php?104-bash-shell-forum
RedirectMatch 301 (?i)^/Webdesign-graphics/?$ /forumdisplay.php?8-Webdesign-graphics
RedirectMatch 301 (?i)^/wts-wtb-webdesign-services/?$ /forumdisplay.php?91-wts-wtb-webdesign-services
RedirectMatch 301 (?i)^/content-management-systems/?$ /forumdisplay.php?10-content-management-systems
RedirectMatch 301 (?i)^/drupal/?$ /forumdisplay.php?49-drupal
RedirectMatch 301 (?i)^/invisionpowerboard/?$ /forumdisplay.php?116-invisionpowerboard
RedirectMatch 301 (?i)^/joomla/?$ /forumdisplay.php?50-joomla
RedirectMatch 301 (?i)^/magento/?$ /forumdisplay.php?51-magento
RedirectMatch 301 (?i)^/magento-extensions-themes/?$ /forumdisplay.php?128-magento-extensions-themes
RedirectMatch 301 (?i)^/phpbb/?$ /forumdisplay.php?13-phpbb
RedirectMatch 301 (?i)^/vbulletin/?$ /forumdisplay.php?12-vbulletin
RedirectMatch 301 (?i)^/wordpress/?$ /forumdisplay.php?11-wordpress
RedirectMatch 301 (?i)^/wordpress-themes/?$ /forumdisplay.php?127-wordpress-themes
RedirectMatch 301 (?i)^/seo-search-engine-optimisation/?$ /forumdisplay.php?63-seo-search-engine-optimisation
RedirectMatch 301 (?i)^/seo-services-offers-requests/?$ /forumdisplay.php?95-seo-services-offers-requests
RedirectMatch 301 (?i)^/linkbuilding/?$ /forumdisplay.php?86-linkbuilding
RedirectMatch 301 (?i)^/linkbuilding-offers-requests/?$ /forumdisplay.php?96-linkbuilding-offers-requests
RedirectMatch 301 (?i)^/backlinks-ad-spots-offers-requests/?$ /forumdisplay.php?48-backlinks-ad-spots-offers-requests
RedirectMatch 301 (?i)^/entertainment/?$ /forumdisplay.php?118-entertainment
RedirectMatch 301 (?i)^/finance/?$ /forumdisplay.php?117-finance
RedirectMatch 301 (?i)^/health-beauty/?$ /forumdisplay.php?120-health-beauty
RedirectMatch 301 (?i)^/internet/?$ /forumdisplay.php?119-internet
RedirectMatch 301 (?i)^/website-marketing/?$ /forumdisplay.php?32-website-marketing
RedirectMatch 301 (?i)^/introducing-product/?$ /forumdisplay.php?33-introducing-product
RedirectMatch 301 (?i)^/customer-service/?$ /forumdisplay.php?34-customer-service
RedirectMatch 301 (?i)^/social-networks/?$ /forumdisplay.php?35-social-networks
RedirectMatch 301 (?i)^/pay-per-click/?$ /forumdisplay.php?36-pay-per-click
RedirectMatch 301 (?i)^/affiliate-marketing/?$ /forumdisplay.php?37-affiliate-marketing
RedirectMatch 301 (?i)^/blackhat/?$ /forumdisplay.php?110-blackhat
RedirectMatch 301 (?i)^/website-monetization/?$ /forumdisplay.php?58-website-monetization
RedirectMatch 301 (?i)^/ppc/?$ /forumdisplay.php?105-ppc
RedirectMatch 301 (?i)^/cpa/?$ /forumdisplay.php?106-cpa
RedirectMatch 301 (?i)^/affiliate/?$ /forumdisplay.php?107-affiliate
RedirectMatch 301 (?i)^/banners-links/?$ /forumdisplay.php?108-banners-links
RedirectMatch 301 (?i)^/backlinks-ad-spots-offers-requests/?$ /forumdisplay.php?109-backlinks-ad-spots-offers-requests
RedirectMatch 301 (?i)^/website-reviews/?$ /forumdisplay.php?14-website-reviews
RedirectMatch 301 (?i)^/marketplace/?$ /forumdisplay.php?42-marketplace
RedirectMatch 301 (?i)^/accounts/?$ /forumdisplay.php?113-accounts
RedirectMatch 301 (?i)^/backlinks-ads/?$ /forumdisplay.php?88-backlinks-ads
RedirectMatch 301 (?i)^/content-writing/?$ /forumdisplay.php?47-content-writing
RedirectMatch 301 (?i)^/other-services/?$ /forumdisplay.php?54-other-services
RedirectMatch 301 (?i)^/domains/?$ /forumdisplay.php?87-domains
RedirectMatch 301 (?i)^/posting-promoting/?$ /forumdisplay.php?112-posting-promoting
RedirectMatch 301 (?i)^/programming/?$ /forumdisplay.php?90-programming
RedirectMatch 301 (?i)^/scripts/?$ /forumdisplay.php?46-scripts
RedirectMatch 301 (?i)^/social-networks/?$ /forumdisplay.php?93-social-networks
RedirectMatch 301 (?i)^/webdesign/?$ /forumdisplay.php?92-webdesign
RedirectMatch 301 (?i)^/webhosting-jobs-works/?$ /forumdisplay.php?89-webhosting-jobs-works
RedirectMatch 301 (?i)^/websites/?$ /forumdisplay.php?44-websites
RedirectMatch 301 (?i)^/hosting-forum/?$ /forumdisplay.php?15-hosting-forum
RedirectMatch 301 (?i)^/general-hosting-discussion/?$ /forumdisplay.php?31-general-hosting-discussion
RedirectMatch 301 (?i)^/control-panels/?$ /forumdisplay.php?21-control-panels
RedirectMatch 301 (?i)^/shared-hosting/?$ /forumdisplay.php?16-shared-hosting
RedirectMatch 301 (?i)^/multi-hosting/?$ /forumdisplay.php?17-multi-hosting
RedirectMatch 301 (?i)^/shared-offers-requests/?$ /forumdisplay.php?24-shared-offers-requests
RedirectMatch 301 (?i)^/reseller-hosting/?$ /forumdisplay.php?18-reseller-hosting
RedirectMatch 301 (?i)^/reseller-offers-requests/?$ /forumdisplay.php?25-reseller-offers-requests
RedirectMatch 301 (?i)^/whmcs-billing-system/?$ /forumdisplay.php?129-whmcs-billing-system
RedirectMatch 301 (?i)^/control-panels-cpanel-whm/?$ /forumdisplay.php?134-control-panels-cpanel-whm
RedirectMatch 301 (?i)^/vps-hosting/?$ /forumdisplay.php?19-vps-hosting
RedirectMatch 301 (?i)^/vps-offers-requests/?$ /forumdisplay.php?26-vps-offers-requests
RedirectMatch 301 (?i)^/linux-forum/?$ /forumdisplay.php?131-linux-forum
RedirectMatch 301 (?i)^/dedicated-server-hosting/?$ /forumdisplay.php?20-dedicated-server-hosting
RedirectMatch 301 (?i)^/dedicated-offers-requests/?$ /forumdisplay.php?27-dedicated-offers-requests
RedirectMatch 301 (?i)^/linux-forum/?$ /forumdisplay.php?132-linux-forum
RedirectMatch 301 (?i)^/cloud-hosting/?$ /forumdisplay.php?23-cloud-hosting
RedirectMatch 301 (?i)^/cloud-offers-requests/?$ /forumdisplay.php?28-cloud-offers-requests
RedirectMatch 301 (?i)^/domain-names/?$ /forumdisplay.php?29-domain-names
RedirectMatch 301 (?i)^/domains-offers-requests/?$ /forumdisplay.php?30-domains-offers-requests
RedirectMatch 301 (?i)^/linux-forums/?$ /forumdisplay.php?22-linux-forums
RedirectMatch 301 (?i)^/beginners/?$ /forumdisplay.php?79-beginners
RedirectMatch 301 (?i)^/desktop-x-windows/?$ /forumdisplay.php?111-desktop-x-windows
RedirectMatch 301 (?i)^/hardware/?$ /forumdisplay.php?114-hardware
RedirectMatch 301 (?i)^/mysql-apache-php/?$ /forumdisplay.php?85-mysql-apache-php
RedirectMatch 301 (?i)^/mailserver/?$ /forumdisplay.php?121-mailserver
RedirectMatch 301 (?i)^/networking/?$ /forumdisplay.php?80-networking
RedirectMatch 301 (?i)^/programming-scripting/?$ /forumdisplay.php?83-programming-scripting
RedirectMatch 301 (?i)^/security-protection/?$ /forumdisplay.php?84-security-protection
RedirectMatch 301 (?i)^/virtualisation/?$ /forumdisplay.php?82-virtualisation
RedirectMatch 301 (?i)^/advertisement/?$ /forumdisplay.php?38-advertisement
RedirectMatch 301 (?i)^/general-advertisement/?$ /forumdisplay.php?41-general-advertisement
RedirectMatch 301 (?i)^/general-advertisement-archive/?$ /forumdisplay.php?78-general-advertisement-archive

(?i) means case insensitive

How i have generated the Redirect 301 rules? I have used Excel/Calc table processor where i have pasted data from /public_html/includes/datastore/datastore_cache.php it contained vbseo rules possibly. so i have pasted it and played with it. Used search & replace function etc.