Home  >  Article  >  Backend Development  >  Apache如何设置域名访问后直接进入子目录

Apache如何设置域名访问后直接进入子目录

WBOY
WBOYOriginal
2016-06-20 12:36:482465browse

Apache如何设置域名访问后直接进入子目录?

比如说我的网站是:http://jiaoshi.xinxuenet.com/   当访问的人从 浏览器地址栏输入这个网址后,

我希望他直接打开http://jiaoshi.xinxuenet.com/bbs/ 直接进入这个目录,应该怎么设置???

不用重定向和文件添加跳转代码


回复讨论(解决方案)

httpd-vhosts.conf 里配置一下 可否满足楼主需求?

httpd-vhosts.conf 里配置一下 可否满足楼主需求?



你是指配置多个虚拟端口,直接指向bbs目录?

你的服务器是linux 还是windows ?  配置虚拟主机指向/bbs 目录就是了。

你的服务器是linux 还是windows ?  配置虚拟主机指向/bbs 目录就是了。



我知道了,用.htaccess文件就可以了
直接写
RewriteEngine on 
RewriteRule ^index.php$ hotel_search/index.php
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn