Home >Backend Development >PHP Tutorial >请教一个简单的url重写问题

请教一个简单的url重写问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:44:13906browse

请教怎么将 zonggang.php?shuhao=130
 重写成  read/130

用 RewriteRule 重写


回复讨论(解决方案)

RewriteRule ^/?read/([0-9]+) zonggang.php?shuhao=$1

RewriteEngine on

RewriteRule read/(\d+) zonggang.php?shuhao=$1 [NC]

RewriteEngine OnRewriteRule ^read\/([0-9]+)$ zonggang.php?shuhao=$1 [NC] [NC]

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