我需要一个简单的正则表达式来匹配asp页面并将它们重定向到另一个页面。正则表达式htaccess
例如
/showdetails.asp?id=1334
到
/page-redirect.php?page=showdetails&id=1334
这是我迄今为止这似乎并没有工作
RedirectMatch 301 ^/(.*)\.asp?id=(.*)$ /page-redirect.php?page=$1&id=$2
其中作为
RedirectMatch 301 ^/(.*)\.asp$ /page-redirect.php?page=$1
似乎工作。
没关系解决它自己,以躲避需要的?
RedirectMatch 301 ^/(.*)\.asp\?id=(.*)$ /page-redirect.php?page=$1&id=$2