The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Force WWW with htaccess
hello
i want to force www on my forums so that if its typed without the "www" it automatically adds it my forum not on the main domain, it is a subdomain so the code needs to be made to work within the directory where my forum is on my forum is in a directory called "forums" so basically: http://mysite.com/forums i want everything within the that directory to automatically get the "www" Can someone please help me Thank You |
#2
|
||||
|
||||
google is your friend (as is search since this has been covered many times before)
http://davidwalsh.name/no-www-using-htaccess-file (examples for with or without www included in above link.) |
#3
|
||||
|
||||
ive tried those before but it would redirect:
http://mysite.com/forums/forum.php to http://www.mysite.com/forum.php (leaving out my directory) |
#4
|
||||
|
||||
If you are having problems, please post *exactly* what you used and then tell us the *exact* problem you are having with that code.
|
#5
|
||||
|
||||
This is what i used and it just gave me the page not found error
Code:
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mydomain.com/foruns/$1 RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/forums/$1 [R=301,L] |
#6
|
||||
|
||||
foruns? That isn't going to work. mydomain.com won't work either. That also doesn't look like the link I posted. I use something that looks very much like the stuff in the link I posted and it works fine.
|
#7
|
|||
|
|||
This works for me:
Code:
Options +FollowSymLinks RewriteEngine ON RewriteCond %{HTTP_HOST} ^domain.com [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] |
#8
|
||||
|
||||
Quote:
my forum is in a directory within my domain this is similar to my issue: http://www.vbseo.com/f4/add-www-via-...-folder-42567/ |
#9
|
||||
|
||||
My forum is not installed in the root and that htaccess works fine for me. If you are using vbseo, then you will need to ask them for help with the issue.
|
#10
|
||||
|
||||
Can you post your exact code so i can just replace it with my domain
Thank you |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|