PHP的URL有关问题

WBOY
Release: 2016-06-13 12:06:12
Original
818 people have browsed it

PHP的URL问题
大家好。我有个问题: 我的houtai目录放在view下,不在根目录下。如果输入http://ip/houtai  会报404   查看Apache日志,发现服务器去根目录下找houtai文件夹,然后找不到报404. 我期望的是PHP框架解析出houtai文件夹,并到view文件夹下找页面。是不是哪里的配置有问题,URL重写规则配置错了?
在线等,多谢。
------解决方案--------------------
有什么问题就直接说,何必绕那么一个圈子

<IfModule mod_rewrite.c><br />RewriteEngine on<br /><br />#如果目录存在就直接访问目录不进行RewriteRule<br />RewriteCond %{REQUEST_FILENAME} !-d<br /><br />#如果文件存在,就直接访问文件,不进行下面的RewriteRule.(不是文件或文件不存在就执行重写)<br />RewriteCond %{REQUEST_FILENAME} !-f<br /><br />#所有找不着实际路径的文件,统一交给index.php处理<br />RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]<br /></IfModule><br />
Copy after login

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