Home
/
Other Applications
/
How to change the redirect type in vBulletin 4?

How to change the redirect type in vBulletin 4?

When you install a new vBulletin 4 or upgrade from vBulletin 3, you will notice that the topics’, threads’ and posts’ URLs are rewritten in a new way.

For example the following vBulletin 3 URL:

http://forum.siteground.com/showthread.php?t=3

will be changed to:

http://forum.siteground.com/showthread.php?3-Forum-rules-please-read-before-posting!

vBulletin 4 comes with a hardcoded 302 redirect (temporary redirect) for the topics’, threads’ and posts’ URLs. However, such a redirect is not good for Search Engine Optimization. It is handled well by the Google search engine, passing the link popularity from the additional URL to the main one, but causes troubles with the other search engines by splitting the link popularity between the two URLs. This has a negative impact on page rank.

Thus, the best solution is to change the redirect to 301 (permanent redirect). This is the preferred method since the popularity of the old URL will be brought to the new one.

You can change the redirect type by editing the includes/class_friendly_url.php file which is located under your vBulletin folder.

The following lines should be changed:

from:

$code = 302;

to:

$code = 301;

and

from:

exec_header_redirect($url, 302);

to:

exec_header_redirect($url, 301);

If your vBulletin forum is hosted on a SiteGround server, you can edit the file through Site Tools > Site > File Manager.

Share This Article