Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old March 12th, 2001, 04:00 PM
flatskeh flatskeh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 1 flatskeh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've got a problem in which i want to redirect users on any request to my site - say URL -to just the domain name URL, that is the URL without the www. prefix.

I've already read up on howto do this via the ServerAlias and Redirect directives according to yost.com, so my question (which is actually two questions) is:

1: Is there another way to do redirections on a apache server (or perhaps via DNS or some other sort)

2: If yes to above, is there any downside to the proposed method (being speed of execution on the server, unneccesary bandwidth use etc.)?

I'd appreciate some well thought answers.

Thanks in advance :),

- Mikael

Reply With Quote
  #2  
Old March 13th, 2001, 03:24 PM
tron's Avatar
tron tron is offline
SwollenMember
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: the master control
Posts: 234 tron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 44 m 46 sec
Reputation Power: 9
If you want to just have example.com in the browser url, without the http://www. prefix, then i imagine that you could just use the redirect method for apache. so basically for your entry in httpd.conf for http://www.example.com you could have:

Redirect old-URI new-URL

or

Redirect / http://example.com

I don't really know why you would want to do this, when you could just set the document root for http://www.example.com and example.com to the same directory. Either way, the above should work.


Reply With Quote
  #3  
Old April 23rd, 2001, 04:42 AM
chronoton chronoton is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Kenju
Posts: 26 chronoton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
wildcarded DNS

what ever you do, the easiest way would be to set you domain widlcarded...

Example :

Your webserver is 10.10.10.11

your Domain is : mystupiddomain.foo


If this domain isb set up wildcarded for your server in DNS it looks like the following :

*.mystupiddomain.foo -> 10.10.10.11


so firstofall http://mystupiddomain.com will be directed to 10.10.10.11

and the nice feature is :

cometo.mystupiddomain.com will be also directly delivered to 10.10.10.11

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > howto avoid www. prefix?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway