Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

隐藏了index.php
现在我还需要做一个URL重写功能。
http://localhost/goods.php?id... 定向或跳转http://localhost/goods/100
apache 重写如何实现,nginx 重写如何实现?
如图所写,不起作用
clipboard.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
105 views
Welcome To Ask or Share your Answers For Others

1 Answer

apache的
RewriteEngine on
RewriteRule /goods/([0-9]+) /goods.php?id=$1

nginx一样的
rewrite /goods/([0-9]+) /goods.php?id=$1;


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...