raksmart活动促销

分享

写回答

发帖

用.htaccess来指定目录的一个问题,求助

国外虚拟主机 国外虚拟主机 1815 人阅读 | 1 人回复

发表于 2009-8-7 19:26:19 | 显示全部楼层 |阅读模式

看了高人的这个贴:
http://bbs.idcspy.com/thread-43673-1-1.html

出现了下面的问题,求高人解决一下:非常感激:

RewriteEngine on
DirectoryIndex index.php index.html index.htm index.cgi
# 访问 http://www.12345.com redirect到 /public_html/12345/
RewriteCond %{HTTP_HOST} ^www.12345.com$
RewriteCond %{REQUEST_URI} !^/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /$1
RewriteCond %{HTTP_HOST} ^www.12345.com$
RewriteRule ^(/)?$ index.php [L]
# 访问 http://club.12345.com redirect到 /public_html/12345/club/
RewriteCond %{HTTP_HOST} ^club.12345.com$
RewriteCond %{REQUEST_URI} !^/club/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /club/$1
RewriteCond %{HTTP_HOST} ^club.12345.com$
RewriteRule ^(/)?$ club/index.php [L]
================
结果 http://club.12345.com 这样正常访问 但是输入http://club.12345.com/index.php 后面只是多了个/INDEX.PHP显示的却是http://www.12345.com 的内容 请问怎么解决?

回答|共 1 个

一路同行

发表于 2009-8-8 10:06:59 | 显示全部楼层

输入http://club.12345.com/index.php 显示的却是http://www.12345.com 的内容,地址栏有发生改变吗
输入http://www.12345.com/index.php能正常显示吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则