• 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.

Redirection Scripts for vBulletin 3.x

Status
Not open for further replies.

NolF

Active member
I'm having a problem with this, I get "HTTP error 500 (internal server error)" when visiting showthread, showpost and forumdisplay

My change has been
old example.com/forum/
new example.com/

Is there anything I can do?

 

NolF

Active member
Okay I fixed my problem

I added the following like to the .htaccess and it fixed the issue: RewriteRule ^forum/(.*)$ http://example.com/$1 [R=301,L]. The idea was to make the request at the root folder and not at /forum. The default .htaccess looks like this now
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^forum/(.*)$ http://example.com/$1 [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) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
I hope that helps anyone else changing from /forum to /
 
F

Floris

Guest
This has helped a lot of people on xenfans.com who we helped convert from vbulletin 3.0, 3.5, 3.6, 3.7 and 3.8 to xenforo 1

tnx!
 

arabic

Member
Warning: require(C:\AppServ\www\vb/library/XenForo/Autoloader.php) [function.require]: failed to open stream: No such file or directory in C:\AppServ\www\vb\forumdisplay.php on line 6

Fatal error: require() [function.require]: Failed opening required 'C:\AppServ\www\vb/library/XenForo/Autoloader.php' (include_path='.;C:\php5\pear') in C:\AppServ\www\vb\forumdisplay.php on line 6
 

Netsultants

Active member
Do the redirection scripts require an .htaccess file? If so, it would be good to explain that in the first post and a sample file in the zip folder.

Also can you leave all the files in the VB folder and test this before deleting them?
 

Netsultants

Active member
Warning: require(C:\AppServ\www\vb/library/XenForo/Autoloader.php) [function.require]: failed to open stream: No such file or directory in C:\AppServ\www\vb\forumdisplay.php on line 6

Fatal error: require() [function.require]: Failed opening required 'C:\AppServ\www\vb/library/XenForo/Autoloader.php' (include_path='.;C:\php5\pear') in C:\AppServ\www\vb\forumdisplay.php on line 6
I get the same error but obviously different path.

It's looking for this file in the old vb folder :/forums/library/XenForo/Autoloader.php
not the new folder : /new_forums/library/XenForo/Autoloader.php

What is the solution?
 

Netsultants

Active member
Thanks Kier, I installed it per instructions and it works except for the main forum page.

I don't know how to solve it for: domain.com/oldforum or domain.com/oldforum/index.php

BTW - I'm using SEO friendly urls
 

Kier

XenForo developer
Staff member
I don't know how to solve it for: domain.com/oldforum or domain.com/oldforum/index.php
To fix that, make a new file called index.php, place it into the same directory as the rest of the scripts and enter the following contents:
PHP:
<?php

header('Location: http://url.to.your/xenforo');
(replacing the URL with the correct one)
 

Netsultants

Active member
To fix that, make a new file called index.php, ................
Excellent!

I tried it and it worked great.

Two things:

1. In your first post you make reference to 301config.php and the file name is config.php. That might confuse some people. Should it be "301 config.php" ?

2. I made an example index.php for people that don't know how or just to make it easier for them.
Here it is:

Just rename it to index.php and follow instructions in the file.
 

Attachments

Kier

XenForo developer
Staff member
In your first post you make reference to 301config.php and the file name is config.php.
That's why I suggested you should re-download the zip. It contains various improvements over the version you downloaded.
 

Netsultants

Active member
I thought our messages had crossed and you didn't know I had already downloaded the ver2.

So you're saying that Ver 2 has also been updated and I downloaded the earlier version of it. Ok

Edit - Done, Thanks
 

Kier

XenForo developer
Staff member
I thought our messages had crossed and you didn't know I had already downloaded the ver2.

So you're saying that Ver 2 has also been updated and I downloaded the earlier version of it. Ok

Edit - Done, Thanks
No problem - you were the only person that downloaded the original v2 scripts.
 

xFalcon

Member
Just copied the files into my old vb directory and it is working well. Thanks for releasing this - it has fixed my problem of what to do with the old vb forum.
 

Dean

Well-known member
Awesome. :)

We are going to migrate from vb3.8 at mysite.com/forums to xf at mysite.com.

My testing:
  • mysite.com/forums - where our vb3.8 live site is presently
  • mysite.com/testxf - is where the xf test site is, with an import of a recent database from the mysite.com/forums
  • mysite.org points to mysite.com/testxf (yes I purchased the .org domain too)
  • mysite.com/testxf/forums (or mysite.org/forums) contains the 4 files in post #1 of this thread. In fact those are the only files in that directory.
  • 301config.php has the line "$fileDir = '/home/mysite/public_html/testxf';"
  • For testing I took links from the live site, and edited the urls to contain .org instead of .com.
A couple of things that may save someone else time in the future:
If you have a live site and are comparing to a test site, links to specific posts newer than the import will result in a blank page. For instance editing this url to a new post on the live site, but replacing it with .org instead of .com:
http://www.mysite.com/forums/showthread.php?p=138581#post138581
'http://www.mysite.org/#post138581' - will go to this link, which is a blank screen.
That seems incredibly obvious, but I did not realize it at first.

Links in this format will result in being taken to the beginning of the proper thread, instead of to a certain page of a long thread.
http://www.mysite.com/forums/showthread.php?t=4&page=146
Which again seems obvious in retrospect.

Works great! Thank you very much!
 

Dean

Well-known member
I just now tested http://www.mysite.com/forums/index.php which did not work, and caused me to re-read this thread:
To fix that, make a new file called index.php, place it into the same directory as the rest of the scripts and enter the following contents:
PHP:
<?php

header('Location: http://url.to.your/xenforo');
(replacing the URL with the correct one)
The index.php does not seem to be in the zip file on post #1 of this thread.. though I fixed my situation, just thought I would let you know.
 

gldtn

Well-known member
This works great with showthread.php?t=ID but if I have showthread.php?ID-THREAD-TITLE is redirect to the main xenforo dir, anyway to fix this?
 
Status
Not open for further replies.
Top