Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Htaccess problem
#1
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
Reply
#2
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!
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#3
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.
Reply




Users browsing this thread: 1 Guest(s)