apache rewrite 无法匹配'index'字符串

WBOY
Release: 2016-06-06 20:30:36
Original
920 people have browsed it

.htaccess

<code><ifmodule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|static|robots\.txt)
RewriteRule ^(.*)$ configure.php/$1 [QSA,PT,L]
</ifmodule>
</code>
Copy after login
Copy after login

以下都可以成功匹配:
http://localhost/admin/index/index
http://localhost/indexa/index/index
http://localhost/indexb/index/index

唯独: index开始的无法匹配:
http://localhost/index
http://localhost/index/index/index
错误提示:
Not Found
The requested URL /index/index/index was not found on this server.

没有与目录下的任何文件重名

回复内容:

.htaccess

<code><ifmodule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|static|robots\.txt)
RewriteRule ^(.*)$ configure.php/$1 [QSA,PT,L]
</ifmodule>
</code>
Copy after login
Copy after login

以下都可以成功匹配:
http://localhost/admin/index/index
http://localhost/indexa/index/index
http://localhost/indexb/index/index

唯独: index开始的无法匹配:
http://localhost/index
http://localhost/index/index/index
错误提示:
Not Found
The requested URL /index/index/index was not found on this server.

没有与目录下的任何文件重名

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