doufuhao8085 2010-09-14 07:18
浏览 53
已采纳

如何为参数/参数包含动态值的url创建重写规则?

I have a rwrite rule which is like this:

RewriteRule ^30/edit-print-ready-vinyl-banners.html edit_print_ready_form.php?id=30

Now I need a Rewrite rule such that if i append the dynamic parameter say "pro_id" and "osCsid" to it likewise

edit_print_ready_form.php?id=30&pro_id=51&osCsid=hdsfjhfkjhk11212jhkjkjhkjh

Now if i use the rewrite rule I have mentioned at the top, I do not get the "$_GET['pro_id']" and "$_GET['osCsid']" on the page i am redirected to..

please guide me to write a rewrite rule to have it for dynamic parameters appended to it

  • 写回答

1条回答 默认 最新

  • doushai7225 2010-09-14 07:20
    关注

    Set the QSA flag for that rule to have the original query automatically appended to the new one:

    RewriteRule ^30/edit-print-ready-vinyl-banners.html edit_print_ready_form.php?id=30 [QSA]
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#.net#的问题:End Function
  • ¥50 用AT89C52单片机设计一个温度测量与控制电路
  • ¥15 无法import pycausal
  • ¥15 VS2022创建MVC framework提示:预安装的程序包具有对缺少的注册表值的引用
  • ¥15 weditor无法连接模拟器Local server not started, start with?
  • ¥20 6-3 String类定义
  • ¥15 嵌入式--定时器使用
  • ¥20 51单片机学习中的问题
  • ¥30 Windows Server 2016利用兩張網卡處理兩個不同網絡
  • ¥15 Python中knn问题