.htaccess的问题

WBOY
Release: 2016-06-23 14:19:25
Original
774 people have browsed it

本帖最后由 u010572351 于 2013-08-17 22:41:52 编辑

我用的是框架,使用url重写,我的程序是放在apache下面的htdocs里面.是没有任何问题可以正常运行的,
我的apache及htdocs是在c盘,

然后我对apache配置了虚拟主机.在D盘建立了一个web目录,然后这里面的程序根目录也放了.htaccess文件,但是遗憾的是放在这里的.htaccess失效了,

我的感觉是.htaccess是应该放在apache安装目录下的htdocs下才生效,不知道是不是这样,然后我d盘的程序有没有方法解决使.htaccess也生效?

简单点:
c:/apache/htdocs .htaccess生效
D:/web(虚拟主机)   .htaccess 不生效

谢谢!


回复讨论(解决方案)

配置文件里加个

< Directory D:/web>AllowOverride All< /Directory>
Copy after login
Copy after login


重启apache试试

配置文件里加个

< Directory D:/web>AllowOverride All< /Directory>
Copy after login
Copy after login


重启apache试试

感谢!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template