samh004
Member
We took the path of vB4 > 1.5 > 2.1, with 18 months on 1.5 where redirects from old vBulletin links were working great. Since upgrading to 2.1 though they have all stopped working. I was under the impression there should be no reason for these rules to stop working, but they mysteriously have. I understand the principles behind "mod_rewrite" but I am far from an expert and so far my attempts to fix the problem on my own have ended with broken links or a broken installation. Hoping someone can point me in the right direction.
An example of a previous vBulletin link is as follows: http://www.example.com/community/trip-reports-and-trip-photos/thread-title-12345.html
Our .htaccess file was setup with a long list of repeating redirects for different forums, and I'll include a snippet of the 5 lines from the forum that relates to the link above, below. In total, 410 lines comprising 82 forums... there's probably a more succinct way of redirecting old links.
When clicking links currently, the URL becomes https://www.example.com/community/trip-reports-and-trip-photos/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/index.php
An example of a previous vBulletin link is as follows: http://www.example.com/community/trip-reports-and-trip-photos/thread-title-12345.html
Our .htaccess file was setup with a long list of repeating redirects for different forums, and I'll include a snippet of the 5 lines from the forum that relates to the link above, below. In total, 410 lines comprising 82 forums... there's probably a more succinct way of redirecting old links.
Apache config:
<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 /community
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/community/$1 [R,L]
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^trip-reports-and-trip-photos/(.*?)-([0-9]+)-new-post.html showthread.php?t=$2
RewriteRule ^trip-reports-and-trip-photos/(.*?)-([0-9]+).html showthread.php?t=$2
RewriteRule ^trip-reports-and-trip-photos/index([0-9]+)\.html forumdisplay.php?f=92&page=$1 [NC,L]
RewriteRule ^trip-reports-and-trip-photos forumdisplay.php?f=92 [NC,L]
RewriteRule ^trip-reports-and-trip-photos/ forumdisplay.php?f=92 [NC,L]
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>
When clicking links currently, the URL becomes https://www.example.com/community/trip-reports-and-trip-photos/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/install/index.php