Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在通过设置条件规则在 htaccess 文件中从我的站点写入 url。例子
RewriteRule product/([a-zA-Z0-9-.]*)-([0-9]*).html$ /index.php?l=product_detail&p=$2
这很好用并且可以完成工作,但是由于只有最后一个数字很重要,所以第一个措辞可以是任何东西!
如果这是一个有效的措辞,我如何在数据库中执行检查,如果不是,它应该被重定向到 404 页面?