Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Htaccess problem
Author Message
harshalone Offline
Junior Member

Posts: 10
Joined: Jun 2011
2011-09-08 21:05:20
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
Find all posts by this user Quote this message in a reply
Connie Offline
Super Moderator

Posts: 2,684
Joined: Feb 2011
2011-09-08 21:09:47
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
Find all posts by this user Quote this message in a reply
Vulch Offline
Junior Member

Posts: 30
Joined: Dec 2010
2011-09-10 07:45:12
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.
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)

Generate Leads from Documents vCard Hosting