RSS
热门关键字:    精舞门-2  激情  精舞门  周杰伦
当前位置 : 主页>数码网络>

不限流量且赠送独立IP地址

IXwebhosting如何在一个IP下做多个站

来源: 作者: 时间:2008-08-24 Tag:虚拟主机   点击: ...
   





众所周知,IXwebhosting在一个IP下只能做一个站,独立IP用完之后,新建站的话用的都是共享IP,可是国外的IP经常面临被封的命运,所以很多人都想在一个IP下面建多个站。
用IX差不多快1年了,以前没有注意过,经过前一段时间的测试,发现完全可以实现。
因为IX的空间支持.htaccess文件,况且网站都是独立IP,所以我们将网站的域名解析到自己的独立IP,然后在独立IP所在网站的根目录建立一个子文件夹.
例:我现在要在76.163.217.47这个IP下面再做一个站,原有的站是www.379life.com
现在我想再建一个www.heluochina.net 的网站。
于是我先在www.379life.com 的根目录建立一个heluochina的文件夹,然后制作了一个.htaccess文件。

代码:
DirectoryIndex default.php index.htm index.php index.html default.htm default.html index.shtml default.shtml
RewriteEngine On
Options All -Indexes
php_value upload_max_filesize 20M
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?379life.com$
RewriteCond %{REQUEST_URI} !^/379lifes/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /379lifes/$1
RewriteCond %{HTTP_HOST} ^(www.)?379life.com$
RewriteRule ^(/)?$ 379lifes/index.php [L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?heluochina.net$
RewriteCond %{REQUEST_URI} !^/heluochina/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /heluochina/$1
RewriteCond %{HTTP_HOST} ^(www.)?heluochina.net$
RewriteRule ^(/)?$ heluochina/index.php [L]
ErrorDocument 401 /404.htm
ErrorDocument 403 /404.htm
ErrorDocument 404 /404.htm
ErrorDocument 500 /404.htm
DirectoryIndex default.php index.htm index.php index.html default.htm default.html index.shtml default.shtml


这个是定义默认首页的
RewriteEngine On
Options All -Indexes
php_value upload_max_filesize 20M
这个是修改程序上传文件大小的
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?379life.com$
RewriteCond %{REQUEST_URI} !^/379lifes/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /379lifes/$1
RewriteCond %{HTTP_HOST} ^(www.)?379life.com$
RewriteRule ^(/)?$ 379lifes/index.php [L]
这个是我绑定的另外一个域名。(网站还没建好,呵呵)
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?heluochina.net$ 这个是域名
RewriteCond %{REQUEST_URI} !^/heluochina/   这个是目录设置
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /heluochina/$1 目录设置
RewriteCond %{HTTP_HOST} ^(www.)?heluochina.net$   域名
RewriteRule ^(/)?$ heluochina/index.php [L] 默认访问的文件,可以修改成别的
上面这个就是我绑定的www.heluochina.net 的域名了,呵呵。
ErrorDocument 401 /404.htm
ErrorDocument 403 /404.htm
ErrorDocument 404 /404.htm
ErrorDocument 500 /404.htm
这些是错误文档定义。 heluochina.net

其实.htaccess文件很强大的,可以实现很多功能,甚至可以定义php参数,比如上传文件大小,PHP程序运行时间等等,只要善于发掘,就能够实现更多的功能。





嫁为人妻的女人味
嫁为人妻的女人味
嫁为人妻的女人味
灯草席子上波霸m
灯草席子上波霸m
人如其名解暑清凉


   
相关文章
ixwebhosting支持在线web文件管理和解压
IXWebhosting 如何设置默认首页
ixwebhosting主机连接数的缺点和使用指南
IXWebHosting 虚拟主机的网站备份策略
创建 CNAME 记录:ix web hosting
ixWebHosting服务器数据中心搬迁完毕,主
IXwebhosting如何在一个IP下做多个站
IXwebhosting美国虚拟主机中文介绍
随机文章
北京网通详解奥运"封网"传言 是为保信息
360安全卫士一款恶意插件(womsoyk系列盗
ixWebHosting服务器数据中心搬迁完毕,主
Kaspersky Internet Security 2009 8.0.0
网友警告微软没执法权 黑屏补丁被破解(图
创建 CNAME 记录:ix web hosting
[求助]afd.sys引起的系统蓝屏问题,麻烦
IXwebhosting美国虚拟主机中文介绍
新方法轻松破解微软正版验证-破解补丁
彩虹QQ显IP显隐身--彩虹QQ官方网站


        
精彩推荐