Home >Backend Development >PHP Tutorial >.htaccess rewrite的编写

.htaccess rewrite的编写

WBOY
WBOYOriginal
2016-06-06 20:21:421233browse

我地址重写的需求是这样的

/admin/aaa/bbb -> /admin.php/aaa/bbb
/xxx/yyy -> /index.php/xxx/yyy

规则应该是从上到下匹配的 第二条规则中的xxx应该不为admin

那么 这两行规则应该怎么写

我试着写过几个,都报500的错误

回复内容:

我地址重写的需求是这样的

/admin/aaa/bbb -> /admin.php/aaa/bbb
/xxx/yyy -> /index.php/xxx/yyy

规则应该是从上到下匹配的 第二条规则中的xxx应该不为admin

那么 这两行规则应该怎么写

我试着写过几个,都报500的错误

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