?
Solved

Remove www requirement from website

Posted on 2009-04-02
21
Medium Priority
?
558 Views
Last Modified: 2013-11-30
Good afternoon everyone,

      Currently i am redirecting one of my websites to our current main website. For some reason when i leave off the www. it prompts public users for a username and password. I need to change it to redirect to the website weather someone uses the www.website or website format in the URL. Let me know if you need any more information.

       Thank you,

 -Casper114
0
Comment
Question by:casper114
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 8
  • 3
  • +1
21 Comments
 
LVL 6

Expert Comment

by:IKZ
ID: 24054363
Just add these two lines to your .htaccess file

RewriteEngine On RewriteRule ^/(.*)
http://www.example.com/$1 [L,R=301]
0
 
LVL 19

Expert Comment

by:Jones911
ID: 24054405
is the ipaddress in DNS set correctly for the base record?  OR did u just set the www a record?
0
 

Author Comment

by:casper114
ID: 24054421
I set the www a record

i do not see a .htaccess file...
0
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 
LVL 19

Expert Comment

by:Jones911
ID: 24054443
well its a DNS issue its probably still propagating or u forgot to set the base @ record.
0
 

Author Comment

by:casper114
ID: 24054469
The base A record look fine... any suggestions? Anything i can provide that will make it easier?
0
 
LVL 19

Expert Comment

by:Jones911
ID: 24945512
Did you set a host header entry for domain.com not just www.domain.com
0
 

Author Comment

by:casper114
ID: 24981636
 
 This is what my DNS records look like. Can you tell with this information?

DNS records for mydomain.com.:

 Name           Type        Data  
                     SOA        cbru.br.ns.els-gms.att.net.    
                     NS           cbru.br.ns.els-gms.att.net.
                     NS           cmtu.mt.ns.els-gms.att.net.
@.                 A             12.49.x.x    
localhost.      A             127.0.0.1    
mail.              A              12.49.x.x    
test.              A              12.49.x.x  
www.          A              12.49.x.x    
@.                MX             10 mail.mydomain.com.    
 

      Thanks!

 -Casper
0
 
LVL 19

Expert Comment

by:Jones911
ID: 24981657
On the webserver did you set up a host header (IIS ) or a server alias ( Apache )
0
 

Author Comment

by:casper114
ID: 24981729
Yes I have a host header set with the internal IP address of the webserver and the www.mydomain.com value and I have an ip address showing default with a host header value of mydomain.com without the www.

      Thanks!

 -Casper
0
 
LVL 19

Expert Comment

by:Jones911
ID: 24981990
Post a screen shot.
0
 

Author Comment

by:casper114
ID: 24982823
 Here you go.

       Thanks!

 -Casper
0
 
LVL 19

Expert Comment

by:Jones911
ID: 24982833
That didnt work :)
0
 

Author Comment

by:casper114
ID: 24983525
whoops. sorry about that. here you go.
     Thanks!
-Casper
 
 

untitled.bmp
0
 
LVL 19

Accepted Solution

by:
Jones911 earned 2000 total points
ID: 24983551
Remove the IP leave it as default.
0
 
LVL 4

Expert Comment

by:BMPTS
ID: 24983587
Your host header is pointed to www.sitename remove the host header leave as default, or just use domainname.com and it should work.
0
 

Author Closing Comment

by:casper114
ID: 31565998
Thank you!
0
 
LVL 19

Expert Comment

by:Jones911
ID: 24983619
Don't remove the host header's leave it as it is this way you can add more sites later without any changes.  Glad you now have it working.
0
 

Author Comment

by:casper114
ID: 24983640
Gotchya! Thanks again!
0
 
LVL 4

Expert Comment

by:BMPTS
ID: 24986616
as an FYI you can add additional sites even with a default host header set to nothing... as long as it's in IIS should be fine... don't know anything about apache.
0
 
LVL 4

Expert Comment

by:BMPTS
ID: 24986618
PPS
Other sites will require host header...
 
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question