rewrite 规则求解,在线等…………
/sell_list.php 重定向到 /sell
/sell_list.php?fid=1 重定向到 /sell/list?fid=1
/bencandy.php?fid-55-id-21619-page-1.htm 重定向到 /news/bencandy.php?fid=55&id=21619
求高手帮忙,我自己写了好多次都不对。。
------解决方案--------------------
RewriteEngine on
#http://www.aa.com/webapp/sell_list.php?fid=111222
RewriteCond %{QUERY_STRING} ^fid=([0-9]+)
RewriteRule ^sell_list\.php$ sell/list [L]
#http://www.aa.com/webapp/sell_list.php
RewriteRule ^sell_list\.php$ sell [L]
#http://www.aa.com/webapp/bencandy.php?fid-55-id-21619-page-1.htm
RewriteCond %{QUERY_STRING} ^fid-([0-9]+)-id-([0-9]+)-page-1\.htm
RewriteRule ^bencandy\.php(.*)$ news/bencandy.php?fid=%1&id=%2 [L] <div class="clear"></div>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号