XF 2.0 vBulletin Forum and Category Link Rewrites Broken

TVA

Member
I have successfully imported everything, and used the XenForo vBulletin 4 Importer, as well as the XenForo Redirects for vBulletin, and finally the DragonByte Tech: SEO Redirects.

Everything is working fine, EXCEPT forum category links and forum links.

I am under the understanding that these redirects will have to be hardcoded one by one manually. I have already compiled a list in the following format:

Redirect 301 /news-and-announcements/ https://www.sample.co/community/#news-announcements.3
Redirect 301 /underground-news/ https://www.sample.co/community/forums/underground-news.6/

The top is a category (node), the second is a forum section.

I have placed the 301 redirects at the bottom of the .htaccess file supplied by XenForo Redirects for vBulletin, and it is not working. I have also tried placing it at the top of the .htaccess file, no luck. I have attached it as htaccess.txt in case anyone can help!

The forum categories and sections are still forwarding to the wrong link format: https://www.sample.co/community/news-and-announcements/

Am I missing something?

I would deeply appreciate any assistance I can get. I have already asked DBTech and he told me he didn't know what to do.
 
Last edited:
For Redirect rules, you need the full path part of the URL (I believe). So that would mean, for example, /community/news-and-announcements/.
 
They aren't working because you should never mix mod_rewrite (rewritecond / rewriterule) with mod_alias (redirect / redirectmatch / alias / aliasmatch / redirectpermanent / redirectemp / scriptalias / scriptaliasmatch ) in .htaccess files.

The reason is .htaccess is scanned by each module independently of other modules. Your mod_rewrite rules are being scanned, XF ends up getting the urls it can't match and processes the URL as a 404. The URL has already been serviced by mod_write and passed to XF and so mod_alias Redirect items are not run.

Replace all your Redirect.... with rewriterule:
Code:
Redirect 301 /news-and-announcements/ https://www.tvaddons.co/community/#news-announcements.3
change to
RewriteRule ^news-and-announcements/$ https://www.tvaddons.co/community/#news-announcements.3 [R=301,L]

These rules should go above the XF rules in .htaccess:
Code:
<IfModule mod_rewrite.c>
	RewriteEngine On

--- Place your custom redirects here ---

	#	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}]

	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>
 
Top Bottom