且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

传递和URL作为国防部重写参数

更新时间:2023-02-24 10:36:53

嗯,你的第一个问题(在你的第一个code座)是你的正则表达式模式不匹配的URL,因为它只会匹配开始的字符串以http://然后只含有alphanum或破折号,它用一个句号或字母结束。也许这只是一个错字,并应该有一个量词在那里,但即便如此,它会失败匹配非常大的比例或URL。

Well your first problem (in your first code block) is that your Regex pattern will not match a URL since it will only match a string that begins with http:// then contains nothing but alphanum or dashes, which ends with a single fullstop or letter. Perhaps this is simply a typo and there should be a quantifier in there, but even so it would fail to match a very large percentage or URLs.

这看起来可能有点陌生,但试试这个...

This may seem a little strange, but try this...

RewriteRule ^go/http:/(.*)/?$ feedmini.php?url=http://$1 [R=302,L]