XF 2.2 Redirects from vBulletin

Theo Smit

Member
Hi all, I installed the "Redirects for vBulletin 1.1.7" and it looks like things are good so far as Google search hits are concerned. But if someone navigates directly to the old URL (https://www.catmbr.org/VB_forum), or if they click on a link that directly hits the VB_forum index.php page, then it serves up all the text but with no underlying formatting, as depicted below.

What did I mess up or what else do I need to add?




Screen Shot 2021-01-02 at 5.59.09 PM.webp
 
The redirects are primarily designed to cover specific URLs, so as it stands, for other URLs that people may have bookmarked, you may need to add specific redirects.

You may be able to do something like the following in the .htaccess file in your VB_forum directory:
Code:
RedirectMatch permanent "/VB_forum/(index.php)?$" http://example.com
(Adjust the URL as necessary.)
 
The redirects are primarily designed to cover specific URLs, so as it stands, for other URLs that people may have bookmarked, you may need to add specific redirects.

You may be able to do something like the following in the .htaccess file in your VB_forum directory:
Code:
RedirectMatch permanent "/VB_forum/(index.php)?$" http://example.com
(Adjust the URL as necessary.)
Thanks Mike, it took me a while to figure out what the issue was, but I have what appears to be a fix.
The problem was that the .htaccess rules could not distinguish between external-host direct accesses to VB_forum/index.php, and the accesses that the rewrite rule in the .htaccess file was generating.

So I renamed VB_forum/index.php to VB_forum/index2.php and then ended up with the following rules:
Code:
    RewriteRule ^index.php$ https://www.catmbr.org/cat-forum/index.php [NS,NC,R=301,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 ^.*$ index2.php [NC,L]

This properly redirects any outside direct link to the VB_forum root but it also makes the search engine links happy (since luckily, VB thread requests don't go through index.php).
 
Back
Top Bottom