且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用标题和ID重写动态URL

更新时间:2023-02-23 12:58:31

规则几乎正确.您只是错误地配置了最后一条语句,它应该是:

The rules are almost correct. You just misconfigured the last statement, which should be:

RewriteRule ^([^-]+)-([^.]+)\.html$ /beweb/newsdetails.php?id=$2&title=$1 [QSA,L,NC]