除了使用浏览器之外,还有更好的方法来测试或调试 Mod 重写规则吗?

发布于 2024-08-28 03:06:32 字数 53 浏览 5 评论 0原文

我很难理解重写到底在做什么。我想设置一些规则,然后能够对其进行测试并像调试器一样逐步执行它。

It's hard for me to grasp what a rewrite is actually doing. I would like to setup some rules and then be able to throw tests at it and step through it like a debugger.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久伴你 2024-09-04 03:06:32

据我所知,没有一个工具可以让你做到这一点,但是,有一些你可以使用的东西对我帮助很大。

我们都知道重写都与正则表达式有关,并且能够正确编写它们是必须

Helicon Tech 有一个名为 正则表达式测试实用程序 的工具(位于页面底部) 。这对于编写规则并评估它们确实很有帮助。它可以让您使用重写命令,并告诉您评估是否存在匹配或错误。

另外,作为第二个工具(用于快速正则表达式),我使用 gskiner 的名为 regexr 的工具。它有一个在线版本,或者我最喜欢的桌面版本。它不会检查重写评估,但会让您编写正则表达式,并突出显示结果,因此,例如,当我想重定向点击页面的用户时:

http://www.website.co.uk/blog /index.cfm?article=1

http://www.website.co.uk/blog/article/1

我只是用它来测试我的匹配,如下所示:
替代文本 http://img13.imageshack.us/img13/5608/exampleyo.jpg< /a>

希望这对您有帮助

As far as I'm aware, there isn't a tool that would let you do that, however, there's a few things you could use that have been helping me a lot.

We all know rewrites are all about regular expressions, and being able to write them properly is a MUST.

Helicon Tech has a tool called Regular Expression Test Utility (in the bottom of the page). it's really good for writing your rules and evaluating them. It will let you use rewrite commands, and will tell you if there are matches, or errors with your evaluations.

Also, as a second tools (for quick regexps), i use a tool called regexr by gskiner. it's available as an online version, or my favourite desktop version. It won't check rewrite evaluations, but will let you write your regular expressions, and highlight the results, so when for example I want to redirect a user that hits the page:

http://www.website.co.uk/blog/index.cfm?article=1

with

http://www.website.co.uk/blog/article/1

I simply use it to test my matches as such:
alt text http://img13.imageshack.us/img13/5608/exampleyo.jpg

Hope this help you

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文