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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 27th, 2001, 05:41 AM
forefront forefront is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 165 forefront User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 52 sec
Reputation Power: 9
Virtual hosting limitation

Virtual Hosting was made possible by the introduction of HTTP/1.1 so that many domains can be hosted on one server.

Fine for most browsers but some only support HTTP/1.0 in which case only the main/server domain gets served up.

Some search engines and spiders still use HTTP/1.0

What I want to do is in the docroot of the main/server domain (call it "domaina.com") put an .htaccess file with a condition that any request for domainb.com domain c.com etc., will be served up a document I have in domaina.com/virtuals/a.html b.html etc., so that the search engine gets something relating to the content of the virtual host, and at least the virtual host gets indexed.

The question is, does an HTTP/1.0 client requesting domainb.com, that receives the content for domaina.com think the domain is a or b?

That page the search engine (or HTTP/1.0 client) indexes will actually point to domaina.com/a.html so it is important at the bottom of that page to include text (not a link) that this page was indexed using HTTP/1.0 and if the browser is upgraded the user can visit domaina.com website at...


Is there a better way (in httpd.conf ??) to do a "conditional docroot" for a virtual host so that if domainx.com is being called and the client supports only HTTP/1.0 it "moves" the docroot for "domainx.com" up to the main "domaina.com" /htdocs/ level and the requesting client gets the info. they need, or at least serves up a customised document with the contents of the index page that would have been displayed for domainx.com?

I have discovered that this situation results in a number of search engines getting 404s on virtual subdomains; if the search engine using HTTP/1.0 requests "www.domainx.com/oink/" and "domaina.com/oink/" doesn't exist (as domaina.com would be the content that would be served up in this situation) then teh search engine gets a 404 and thinks domainx.com has no content, whereas domainx.com could be a very big website.

Thanks.

Reply With Quote
  #2  
Old July 27th, 2001, 06:23 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> does an HTTP/1.0 client requesting domainb.com, that receives the content for domaina.com think the domain is a or b?

A.

>> s there a better way

No way at all. it's the HTTP/1.0 client which doesn't send the HOST header request to Apache. If apache always get domaina.com, no env is set and always receive a request for domaina.com as if no vhosts exist because the client never requested it and therefore Apache doesn't know how to proceed for it.

However, on a webhosting setup, a virtual domain should be mapped to a directory under the default domain. For example, http://www.virtualdomain.com -> http://www.defaultdomain.com/virtualdomain/

>> I have discovered that this situation results in a number of search engines getting 404s

If you know which search engines, put the list down on your site and tell your customers to use http://www.defaultdomain.com/virtualdomain/ for those search engines, if any.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Virtual hosting limitation


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 6 hosted by Hostway