is this an Apache thing?

Status
Not open for further replies.

LotsOfZeros

^^^ Bi-Winning ^^^
Feb 9, 2008
4,648
118
0
www.makemoniesonline.com
I have a website that when I access certain directories, it removes the "www" from the address. What causes this? It's on a shared host with other sites and this is the only one that does this.

for example, my main page is located at hxxp://www.mysite.com but when I type hxxp://www.mysite.com/subdirectory it forwards to hxxp://mysite.com/subdirectory hence removing the www.
 


It's probably your .htaccess file, change to this and non www will always go to www.

Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
 
It's probably your .htaccess file, change to this and non www will always go to www.

Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]

Thank you, that did remedy the issue, makes me wonder why I didn't have this problem when it was on another host & i don't have this happening with other sites on my current host.
rep given
 
Status
Not open for further replies.