vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=224316

Need to remove www from forum URL
by MikesSite
30 Sep 2009 23:19

A lot of the time when you find my forum via a search engine, it will load the page with www in the URL, which we all know causes problems. Anyway to force www out of the url? Messed around w/ the .htaccess file but couldnt really get it to work. The forum is in the /forums directory, not the root directory and I would only want the forum directory to force out the www.

Thanks.

azn_romeo_4u 30 Sep 2009 23:56

Quote:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Use it in .htaccess in your root dir...I don't think it has to be in the forum dir but if it doesn't work in the root dir, then try the forum dir

MikesSite 01 Oct 2009 00:07

Edit: I got it doing what I need it to do now. Thanks.

Quantnet 01 Oct 2009 00:16

what problem with www in the forum url?
I don't have any problem and even want to use htaccess to redirect non-www to www as it will prevent duplicated content in google.


All times are GMT. The time now is 17:53.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.