Solved

Remove www requirement from website

Posted on 2009-04-02
21
553 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

914 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

14 Experts available now in Live!

Get 1:1 Help Now