Quantcast
Viewing all articles
Browse latest Browse all 10

vBulletin: Non-www to www redirection [SOLVED]

Another common thing I usually do for my clients is to redirect non-www version of their vbulletin forums to www-version.

This can be easily achieved by creating a .htaccess file which contains:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

Just replace domain.com with your domain name and upload the file to the /public_html folder Image may be NSFW.
Clik here to view.
:)

If your forums are in a subfolder, i.e. /forum, you should put this .htaccess file IN that folder.
/forum/.htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/forum/$1 [R=301,L]

The sessions might not work (cookies issues) if you set the “forum url” (in “ACP -> Sitename/URL/Contact info”) to: domain.com instead of www.domain.com

Do not forget to check this if the sessions don’t work (this is, your login is right, but next time you click any link in the forum, you are unlogged)


Viewing all articles
Browse latest Browse all 10

Trending Articles