<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Horse的博客&#187; 虚拟主机，域名</title>
	<atom:link href="http://www.mahoupao.net/index.php/tag/%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%ef%bc%8c%e5%9f%9f%e5%90%8d/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mahoupao.net</link>
	<description>马后炮化工</description>
	<lastBuildDate>Mon, 12 Apr 2010 04:48:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>虚拟主机绑定多个域名教程</title>
		<link>http://www.mahoupao.net/index.php/2010/02/02/%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%bb%91%e5%ae%9a%e5%a4%9a%e4%b8%aa%e5%9f%9f%e5%90%8d%e6%95%99%e7%a8%8b%ef%bc%88%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%ef%bc%89.html</link>
		<comments>http://www.mahoupao.net/index.php/2010/02/02/%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%bb%91%e5%ae%9a%e5%a4%9a%e4%b8%aa%e5%9f%9f%e5%90%8d%e6%95%99%e7%a8%8b%ef%bc%88%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%ef%bc%89.html#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:24:31 +0000</pubDate>
		<dc:creator>horse</dc:creator>
				<category><![CDATA[计算机]]></category>
		<category><![CDATA[虚拟主机，域名]]></category>

		<guid isPermaLink="false">http://www.mahoupao.net/?p=51</guid>
		<description><![CDATA[虚拟主机的价格一般比较便宜，但是国内的很多虚拟主机都只可以绑定一个或者两个域名，  多绑定域名就要另外付费了。可不可以用一台虚拟主机可以放我的几个网站 呢？答案是肯定的，下面就看看这个方法：
利用一个asp文件通过浏览器输入的域名，判定他是要打开那个文件夹里的站点，来实现  一个虚拟放置多个站点，如果虚拟主机不支持子目录绑定，这是唯一有效的办法。
实现方法如下：
可以这样，你先在网站根目录下面建立一个 index.asp
然后定义A文件夹下的是A网站
定义B文件夹下的是B网站
定义C文件夹下的是C网站
index.asp 网页文件如下
复制内容到剪贴板代码:
程序代码
&#60;%if   Request.ServerVariables(“SERVER_NAME”)=”www.a.com ” then
response.redirect   “a”
elseif Request.ServerVariables(“SERVER_NAME”)=”www.b.com ” then
response.redirect  “b”
elseif  Request.ServerVariables(“SERVER_NAME”)=”www.c.com ” then
response.redirect   “c”
else
response.redirect “aaa/index.asp”
end if%&#62;
如果用 户访问 http://www.a.com/ 程序跳转至 空间子目录A下
如果用户访问 http://www.b.com/ 程序跳转至  空间子目录B下
如果用户访问 http://www.c.com/ 程序跳转至 空间子目录C下
如果用户访问没有指定的目录跳转至空间根 目录下的index.asp
这个需要虚拟主机支持asp了。国内的虚拟主机基本都支持的，国外的很多vps倒不支持asp

	你还可能感兴趣的相关文章:
	
	无相关日志
	

]]></description>
		<wfw:commentRss>http://www.mahoupao.net/index.php/2010/02/02/%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%bb%91%e5%ae%9a%e5%a4%9a%e4%b8%aa%e5%9f%9f%e5%90%8d%e6%95%99%e7%a8%8b%ef%bc%88%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%ef%bc%89.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
