- 論壇徽章:
- 2
|
本帖最后由 aa673 于 2011-06-15 18:59 編輯
################################################
<VirtualHost *:80>
ServerName www.haha.com
ServerAlias xixi.com
DocumentRoot /data1/www/htdocs/haha/
ErrorLog /data1/www/logs/wanwan.games.sina.com.cn-error_log
CustomLog /data1/www/logs/wanwan.games.sina.com.cn-access_log combine
RewriteEngine on
RewriteCond %{REQUEST_URI} ^xixi.com$ [nc]
RewriteRule !^/cache/(.*)$ - [C]
RewriteRule ^/(.*)$ /yr/$1/ [L]
<IfModule dir_module>
DirectoryIndex index.php index.html index.shtml
</IfModule>
</VirtualHost>
這是我apache虛擬主機的配置,現(xiàn)在我有個需求,就是用戶訪問xixi.com時,訪問的是根目錄的yr/ .
但是我在測試時用 xixi.com/web/ 沒問題(我根目錄下yr/web目錄有個index.php)
但是用xixi.com/web 就會301跳轉(zhuǎn)到 www.haha.com/web/
這時訪問的是根目錄下web目錄里的index.php
大家知道怎么解決嗎? |
|