harshalone
Junior Member
Posts: 10
Joined: Jun 2011
|
Htaccess problem
hi there i figure out a problem in htaccess file of getsimple i.e.,
i want my domain to always go to www.domain.com instead of domain.com
so i added a line of code in htaccess file which is
RewriteCond %{HTTP_HOST} ^domain\.com$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
but after adding this code the site goes down... any input on this please
|
|
|
|
Connie
Super Moderator
Posts: 2,684
Joined: Feb 2011
|
Htaccess problem
There is no hosting panel where you can define which domain (with or without www) points to which directory on the server?
For .htaccess, read here;
http://kb.mediatemple.net/questions/85/U...w-or-https
they show this way:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
you see the difference?
your line ends with " domain\.com$" but the working example which I tested, ends with "example.com [NC] [NC]"
test it out!
|--
Die deutsche GetSimple-Webseite: http://www.Get-Simple.de = the german Get-Simple-Website!
Das deutschsprachige GetSimple-(Unter-)Forum: http://get-simple.info/forums/forumdisplay.php?fid=18
|
|
|
|
Vulch
Junior Member
Posts: 30
Joined: Dec 2010
|
Htaccess problem
I'd normally expect something to have been logged by the web server in its error log that gives more detail about what it's objecting to.
|
|
|
|