全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 5318|回复: 12
打印 上一主题 下一主题

CPUER 进来哟 问题知道一点情况 但是没办法解决

[复制链接]
跳转到指定楼层
1#
发表于 2008-12-26 01:17:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我在子目录下的.htaccess 只有在 主域名下访问 的时候就有效

在 子域名下访问无效啊

列如我的 主域名xxxx.com           我建立的子目录为XXX 我在XXX这个子目录里 放.htaccess 里面包含了404的错误规则

用xxxx.com/xxx  这样访问就有效


我把BBBB.COM 这个域名绑定到XXX这个子目录访问 设置的.htaccess 这个就无效呀·
这个是怎么回事啊?  无论是设置404错误还是伪静态 只要是 .htaccess 的规则  子目录所绑定的米 就没办法
但在主域名下访问改子目录.htaccess所有规则都有效
2#
发表于 2008-12-26 09:03:16 | 只看该作者
在子目录的.htaccess里面的内容这么做一个添加:

RewriteEngine On
下面添加一行
RewriteBase /
3#
 楼主| 发表于 2008-12-26 09:10:56 | 只看该作者
原帖由 cpuer 于 2008-12-26 09:03 发表
在子目录的.htaccess里面的内容这么做一个添加:

RewriteEngine On
下面添加一行
RewriteBase /

无效啊
4#
发表于 2008-12-26 09:12:32 | 只看该作者

回复 3# 的帖子

RewriteBase /  的意思就是代表在本目录为根目录了呀, 怎么会不行呢,你再等会儿。
5#
 楼主| 发表于 2008-12-26 09:12:37 | 只看该作者
我的内容是这样

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
ErrorDocument 404 /40412.html
</IfModule>
6#
 楼主| 发表于 2008-12-26 09:16:48 | 只看该作者
RewriteEngine On
RewriteBase /
ErrorDocument 404 /40412.html
内容换成了上面的

我的主域名是这个

http://abc.572900.com/
主域名下的子目录是下面这个
http://abc.572900.com/bcde4dc/

我设置的404错误 用这个主域名这样子访问就有效 http://abc.572900.com/bcde4dc/sadsadasdasdasdasd


我绑定的blog.4dc.cn 到bcde4dc 子目录 用blog.4dc.cn/sadsadasdasdasdasd
这样就无效
7#
发表于 2008-12-26 09:23:53 | 只看该作者

回复 6# 的帖子

那就奇怪了,我子目录上安装的WordPress,.htaccess 规则就是这样的:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

伪静态正常。
8#
 楼主| 发表于 2008-12-26 09:55:01 | 只看该作者
我这样子发信去了


My main domain name is http://abc.572900.com/
Subdirectory under the main domain name is bcde4dc.
Visit the main domain address: http://abc.572900.com/bcde4dc/123456789
The main domain name set to visit htaccess error in 404 valid.

Http://blog.4dc.cn/123456789/-binding domain
Htaccess set up in the error 404 Invalid
blog.4dc.cn binding in the directory bcde4dc

Blog.4dc.cn bound to bcde4dc the use of sub-http://blog.4dc.cn/sadsadasdasdasdasd
Not appear on page 404
Rule 404 is not only wrong

Htaccess all the rules are null and void in the sub-domain names on the entry into force of the visit to the main domain name

htaccess does not support sub-domain name it?


I hope you will help me check Thank you!
9#
发表于 2008-12-26 20:17:55 | 只看该作者

回复 8# 的帖子

估计回来的回答还是机械的。
10#
 楼主| 发表于 2008-12-27 10:12:00 | 只看该作者
被你说对了··真想太阳老外啊···

Thank you for contacting Hosting Support.

While blog.4dc.cn is pointed to your hosting account, abc.572900.com is not.  Thus, blog.4dc.cn is subject to the .htaccess files you upload to this hosting account, but abc.572900.com is not.

Please contact us if you have any further issues.

Regards,

Amanda W.
Hosting Support
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-10 12:46 , Processed in 0.059500 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表