• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

vBulletin 4.x URL Redirection

Status
Not open for further replies.
Ok, I was using the 4.x suite located at .org/

I am now using Joomla at .org/ and XF located at .org/c/

I was using mod_rewrite 4.x URL's

I uploaded the showthread and forumdisplay files to the XF root .org/c/

I uploaded the mod_rewrite library into the XF library

I installed the xml file

I tried placing:


Code:
RewriteRule ^/threads/ /c/threads
RewriteRule ^/forums/ /c/forums

So it looked like:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

RewriteRule ^/threads/ /c/threads
RewriteRule ^/forums/ /c/forums
</IfModule>

But when I click from Google .org/threads/9913-Fatigue I get a 404 error.

I don't understand how it is going to pull from the XF directory when everything is coming in at root, but there is nothing located at root directly to redirect.

So I tried putting the initial redirect into the Joomla rewrite rules at .org/, and I had to comment most, leaving only the essential actual rewrite rules for it, otherwise I got an internal error. So it looks like:

Code:
RewriteEngine on

RewriteRule ^/threads/ /c/threads
RewriteRule ^/forums/ /c/forums

## Redirection Rules

RewriteCond %{HTTP_HOST} ^ptsdforum\.org
RewriteRule ^(.*)$ http://www.ptsdforum.org/$1 [R=permanent,L]

## Joomla Rewrite Rules

#RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
#RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
#RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
#RewriteRule ^(.*)$ index.php [F,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]


Still nothing... all I get is the Joomla 404 error page.

Any solutions?
 
I moved my xf forum from the forum directory to the root of my site

I used this code for my hataccess

Code:
RewriteEngine on

RewriteRule forum/threads/(.+) http://www.mysite.com/threads/$1 [L,R=301]
RewriteRule forum/forums/(.+) http://www.mysite.com/forums/$1/ [L,R=301]
RewriteRule forum/members/(.+) http://www.mysite.com/members/$1 [L,R=301]
RewriteRule forum/posts/(.+) http://www.mysite.com/posts/$1 [L,R=301]

it works fine for me but how do i make froum/showthread?id-title works too
i just want hatacess file to redirect the same url from froum/showthread?id-title to root/showthread?id-title

the mod would finish the job...


please help
 
If anyone else facing the same problem as me you just need to use this code
it works fine for redirecting all urls to the root
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^forum/(.*)$ /$1 [R=301,NC,L]

Again, thanx for the mod
 
if you need to redirect sub-directory to another sub-directory
try this
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^forum/(.*)$ http://website.com/community/$1 [R=301,NC,L]
 
Have you tried putting the vB4 rewrite rules in /c/.htaccess? (and disabling the XF route redirect plugin)
Yer, tried that and a few more methods... will give KKM's method a shot and see how it goes... I think its more to do with Joomla now being installed at the root, where the suite was installed, and it has its own built-in error system for URL's which is causing the rewrite redirects to fail. I don't think it is this mod...

I have an alternative in place that is Joomla friendly at present.
 
Hello,

I applied these:
  1. Uploaded the contents of standard-basic-advanced/upload folder
  2. There were no old rewrite rules (except the default ones from XF)
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>

  1. Uploaded the contents of mod_rewrite/upload folder
  2. Installed the addon XML file mod_rewrite/addon_vB4Redir.xml
But it didn't work. I used on my board vBSeo so I took a look to this thread:

[Feedback Wanted] Redirects for vBSEO'd URLs

After I added this :

Code:
RewriteEngine on
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]

My threads got redirected, but my categories and forum paginations from my old vb4 are still the same and not redirect.

How I fix this, make this work ?
 
My threads got redirected, but my categories and forum paginations from my old vb4 are still the same and not redirect.

How I fix this, make this work ?

Unfortunately you will have to set up redirects yourself for vBSEO URLs, and individually in the case of ID-less forum URLs. The customisability of vBSEO comes at a price :(
 
The best thing you can do if using VBSEO is to get VBSEO to provide you the custom rewrite rules for your forum to revert the URL's back to your original VB4 mod_rewrite or basic URL's, leave it that way for a good 30 days, then convert over using this mod to redirect. That way, in 30 days Google will pretty much have changed 99.9% of your URL's in their index, without loss through any type of URL issues, then you get a clean conversion over to XF URL's, which will take another 30+ days to be 99% updated.
 
The best thing you can do if using VBSEO is to get VBSEO to provide you the custom rewrite rules for your forum to revert the URL's back to your original VB4 mod_rewrite or basic URL's, leave it that way for a good 30 days, then convert over using this mod to redirect. That way, in 30 days Google will pretty much have changed 99.9% of your URL's in their index, without loss through any type of URL issues, then you get a clean conversion over to XF URL's, which will take another 30+ days to be 99% updated.

Thanks anthony, thats a long shot. The site is for now just for testing purposes. I have now redirected the motherload of the urls's using [Feedback Wanted] Redirects for vBSEO'd URLs Categories, and paginations are lost, but I can live with that for now :)

 
The forumdisplay.php and showthread.php redirects work great.

How difficult would it be to create an attachment.php file that redirects the way forumdisplay.php and showthread.php do? I have links to a lot of attached files that error out now.

---

Okay, not a lot, as it turns out, but some.
 
Hmmm. Getting no love from vBSEO. I don't think I'm quite good enough to dink around with my .htaccess files.

Edit: For the record, do NOT contact vBSEO for this. Even though I paid a crapton of money to them they will not help with redirects to XenForo. I quote:

I'm sorry, but we can't assist you on this matter. Please contact XenForo support for further information.
So....yeah.
 
My redirects are all borked up. Old threads are not going to new threads through any search engine. I complicated things by using SEO and having XF & vB in different directories.

Example:

Old - public_html/forums/...
New - public_html/xenforo/...

This is giving me a headache.
 
I've been looking for this. I noticed the vBulletin 3 redirect add-on, but haven't noticed that there was one for vBulletin 4.

Thanks for this!
 
Status
Not open for further replies.
Top Bottom