The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I prevent the WWW version of my website from being displayed?
Thanks for reading!
I'd simply like to prevent the www version of my vbulletin install from being accessible. e.g. when a person goes to the www version of my forum URL, i'd like to have the www disappear and go to the non www version. I guess I'd use the htaccess file??? Or do i use canonical tags? Please help Thanks |
#2
|
||||
|
||||
Add this to your .htaccess in your sites root directory. If you don't have one there, create one and add this to it:
Code:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301] |
#3
|
||||
|
||||
Also, be sure to update the URL in your admincp before making the change, or you may not be able to login (depending on cookie settings)
|
#4
|
||||
|
||||
Yes, very true! Thank you
|
#5
|
|||
|
|||
Thanks guys
can you be more specific about: "be sure to update the URL in your admincp" what does this mean? |
#6
|
||||
|
||||
Quote:
Code:
AdminCP => Settings => Options => Site Name / URL / Contact Details => Forum URL AdminCP => Settings => Options => Site Name / URL / Contact Details => Homepage URL For example, if you currently have http://www.yoursite.com, you need to change that to http://yoursite.com |
Благодарность от: | ||
Max Taxable |
#7
|
|||
|
|||
Yay it works
Thanks!!!!!!!!!!!!!!! |
#8
|
||||
|
||||
No problem
|
#9
|
||||
|
||||
Just curious, but how is this different from the following?
Code:
RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ http://yourdomain.com/$1 [R=301,L] |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|