raksmart活动促销

分享

写回答

发帖

[提问] 如何设置绑定独立ip下的文件夹?

国外虚拟主机 国外虚拟主机 5384 人阅读 | 13 人回复

发表于 2010-4-3 02:02:35 | 显示全部楼层 |阅读模式

在论坛里也看到过如何绑定二级域名,和绑定多个域名到独立IP,也一一试过,但总是出现400

现在我想是使用二级域名绑定文件夹。 .htaccess怎么设置?

比如说:
绑定独立IP的文件夹是abc.com
在abc.com这个文件夹下有bbs文件夹
我想使用域名bbs.abc.com绑定这个bbs文件夹,既bbs.abc.com指向abc.com/bbs里的内容,但访问bbs的域名仍然是bbs.abc.com.


.htaccess怎么设置?

回答|共 13 个

gypworks526

发表于 2010-4-3 08:52:19 | 显示全部楼层

试一下以下规则:
  1. Rewriteengine on
  2.    
  3. RewriteCond %{REQUEST_URI} !^/bbs/.*
  4. RewriteCond %{HTTP_HOST} =bbs.abc.com
  5. RewriteRule ^(.*) /bbs/$1 [L]
复制代码

chinapc

发表于 2010-4-3 10:02:23 | 显示全部楼层

不行啊,还是400错误
  1. 404 Error - Not Found
  2. The resource you have requested could not be found on the server. There are many possible reasons for this. Either the file does not exist, there is an error in your request, or the file is not accessible in the requested directory. Please verify that:
  3. You have used the proper case; requests ARE case-sensitive!
  4. You have entered the URL correctly. (i.e. proper directory/filename)
  5. You used the FULL URL. (i.e. proper file type: .html, .gif , .jpg, etc.)
  6. You use a tilde (~) before user directories. (i.e. www.furcen.org/~jurann/ )
  7. The user/file still exists on this server.
复制代码

gypworks526

发表于 2010-4-3 10:14:21 | 显示全部楼层

你的域名是什么?
这个访问正常吗!??

chinapc

发表于 2010-4-3 10:28:05 | 显示全部楼层

我换成独立IP的域名试试~~

[ 本帖最后由 chinapc 于 2010-4-3 10:45 AM 编辑 ]

gypworks526

发表于 2010-4-3 10:35:26 | 显示全部楼层

你的这个IP应该是共享IP吧,这样做不可以的。

chinapc

发表于 2010-4-3 10:43:28 | 显示全部楼层

顺便问下~我参考本论坛帖子更改独立IP的
php.ini里的
post_max_size  但是没有发生改变~~是什么原因?

[ 本帖最后由 chinapc 于 2010-4-3 10:58 AM 编辑 ]

gypworks526

发表于 2010-4-3 10:56:08 | 显示全部楼层

回复 7# 的帖子

还需要修改其他的参数才可以的,这个有时候自己操作会不成功,可以联系他们的客服,让他们帮你更改一下,就可以了。

chinapc

发表于 2010-4-3 10:58:14 | 显示全部楼层

这次使用独立IP测试
www.woshuoba.com可以
bbs.woshuoba.com就不行了出现:

Error 500: Internal Server Error

属性已经设置为755了~~~

[ 本帖最后由 chinapc 于 2010-4-3 11:00 AM 编辑 ]

gypworks526

发表于 2010-4-3 11:06:28 | 显示全部楼层

500 应该是你的规则有误,你检查一下,是否有手误或什么其他的错误,或者htaccess这个下面还有其他的规则冲突,有的也可能导致这样的错误。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则