-1

I have my website hosted using XAMPP. I have a domain name purchased through 1and1, and have the A Record pointing at my ip address. The website works just fine if I type in abc.com, but if I try www.abc.com, I get a 404 error.

I called 1and1 up and they said they wont help because they are not hosting the site. They said to make it work I have to do htaccess rewrite.

I tried looking into this, but I cannot seem to find anyone having this issue.

Any help to figure this out would be amazing!

David Faber
  • 12,277
  • 2
  • 29
  • 40
xgcell
  • 1
  • 2
  • Here is how you might do it in reverse (www.abc.com to abc.com) - I'm sure you can figure out how to do it from the code given: http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www – David Faber Dec 29 '14 at 03:41

1 Answers1

0

You will need to do two things:
1) Create one more DNS record for www.abc.com pointing to the same IP address.
2) In your virtual host configurations, look for ServerName abc.com. Add a server alias under server name. ServerAlias www.abc.com

slash
  • 593
  • 8
  • 16