Home >Backend Development >PHP Tutorial >请问一个.htaccess文件解析的有关问题

请问一个.htaccess文件解析的有关问题

WBOY
WBOYOriginal
2016-06-13 10:26:50841browse

请教一个.htaccess文件解析的问题

我的显示文件在products上的showdetail.php?id=**

我想把产品显示成以下的规则;
/products/new-products/13.html
/products/outdoor-led/13.html
/products/indoor-led/13.html

.....

写成RewriteRule ^/products/(\w+)\/13.html$ /products/showdetail.php?id=$1
怎么显示找不到文件呢?

------解决方案--------------------
你有一个 \ 这个,去掉试一试。
------解决方案--------------------
/products/indoor-led/13.html
对于
RewriteRule ^/products/(\w+)\/13.html$ /products/showdetail.php?id=$1
不是还有一个加号不在规则中吗?

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