PDA

View Full Version : Redirection when changing your forums-folder


Bernd Glasstett
03-16-2004, 10:00 PM
Everyone knows the problem: If you want to change the structure of your site and especially change the forums-folder, you would loose all clicks from google or other search-engines. Setting up a 404-page could only redirect the users to the main-page. These small scripts have the same names as the main-pages of vbulletin. You can set them in your old forums-folder and they will redirect the users to the right postings or subforums. The scripts supports both links from vB 2.x and vB 3.x. I am pretty sorry, that I can only select one version of vB here ;) But that's life :)

You don't need to edit any files of your vB-installation. Just place these files in your old forums-folder and please edit config.inc.php - There you can enter:

Siteowner
Newdirectory
And if you would like to use a different domain - just in case
New in version 2.0.0: Language support
New in version 2.0.0: Choose the method for redirecting
New in version 2.0.0: Statisticfunction
New in version 2.0.0: Choose the path to the homepage-script
New in version 2.0.0: X-HTML 1.0 Strict valid https://vborg.vbsupport.ru/external/2004/03/1.gifIt supports passing on links from:

index.php
forumdisplay.php
member.php
showthread.phpSupports these versions:

vb 2.x
vb 3.0.x
vb 3.5.x
vb 3.6.xSupported languages (right now):

Englisch
German (Du)
German (Sie)The script takes its own domain, if you don't define it otherwise - and is pretty flexible.

If you find any bugs, pass them on. https://vborg.vbsupport.ru/external/2004/03/2.gif And if you have any questions, post them here :)

Version 2.0.0 can be considered a comple rewrite. All bugs from the earlier version 1.0.0 have been eliminated. A documentation in english and german has been added.

If you want to contribute more languages, please be free to do so, I will add them to the main project as soon as they appear :)

Owen
03-17-2004, 06:41 AM
Wow cool hack, problem is I used invision board before I installed vbulletin -___-

Bernd Glasstett
03-17-2004, 06:56 AM
I never used an invision-board, but there are two ifs:


if you can tell me, what filenames they used
and if you are sure, that the threadids are the same on the invision-board and on the vB
I can add support for this too :)

gmarik
03-17-2004, 02:05 PM
nice one, test it later ...

MrNase
03-17-2004, 06:41 PM
ah Bernd, this just comes to late. :(

i lost my 1st position on the google rank when i switched from /v2 to / :(

But great work, it will surely help people to prevent that in future :)

Sebastian
03-22-2004, 05:52 PM
this is ok if you do not have htaccess support on your server. otherwise all you have to do is:

RewriteRule ^old_dir /new_dir [R=301,L]

.. and all the urls will be pointed to the correct place.

Bernd Glasstett
03-22-2004, 06:19 PM
true Sebastian, but rewrite_mod has to be compiled with Apache in order to do so, which is no standard.

rooshine
03-28-2004, 05:53 PM
Thanks very much for creating this. It does not seem to be working correctly for me. It forwards users to the correct directory, but it is stripping off the last part of the url. For example, if the url is "/oldDirectory/forumdisplay.php?s=&forumid=3", it will forward to "/newDirectory/forumdisplay.php?s=&forumid=" without the "3". Any ideas?

Thanks.

rooshine
03-28-2004, 06:23 PM
Sorry for the double post, but I found a bug.

In the config.inc.php file there is a variable called $newdirectory

In the other pages it is referred to as $new_directory

I changed the config.inc.php variable to $new_directory and that seemed to work. It still does not fix the problem I mentioned above.

mightyhitter
04-12-2006, 04:20 AM
yeah..change the variable in config to new_directory and replace all the _POST with _GET in other files. it helpful.

Bernd Glasstett
05-17-2007, 06:43 PM
A complete rewrite has been published. The new features:

New in version 2.0.0: Language support
New in version 2.0.0: Choose the method for redirecting
New in version 2.0.0: Statisticfunction
New in version 2.0.0: Choose the path to the homepage-script
New in version 2.0.0: X-HTML 1.0 Strict validAny comments are appreciated :)