Solved

Remove www requirement from website

Posted on 2009-04-02
21
549 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
  • 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now