Solved

Remove www requirement from website

Posted on 2009-04-02
21
555 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Manage ASA using outside IP 14 62
Powerline adapter slow Mbps? 38 172
IR 1023 Scanning 4 28
Network over eigrp 100 topology ? 3 17
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
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

828 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