apache Rewrite 把asp页面转到php

新手上路,请多包涵
  1. 以前的项目中有一个zz_index.asp页面,现在用apache+php做了整套网站,但zz_index.asp这个网址已经打印了很多二维码,不能修改,所以想用apache的Rewrite功能:

把zz_index.asp?sn=123456 跳转到 /index.php/fw/index?sn=123456

如下写法不起作用,怎么办呢?

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
  
  RewriteCond %{REQUEST_FILENAME} (\.asp)
  RewriteRule (\.asp) index.php/fw/index$1 [L]
</IfModule>
阅读 1.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进