Solved

Remove www requirement from website

Posted on 2009-04-02
21
557 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
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
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 500 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

688 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