如何调试htaccess重写脚本 [英] How to debug htaccess rewrite script

查看:27
本文介绍了如何调试htaccess重写脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何创建和调试这种脚本,如果您不习惯编写它们(像我一样),可能会有点头疼.

I was wondering how to create and debug this kind of script that can become a bit of headache if you are not used to write them (like me).

您是否使用工具来创建它们?

Do you use tool to create them?

有什么技巧可以调试正在发生的事情,而不是仅仅创建一个本地结构并查看浏览器中发生的事情?

Any tips to debug what's going on instead of just create a local structure and see what's happening in the browser?

推荐答案

读者注意:旧答案不再适用.

从 2.4 版开始,Apache 不再允许 RewriteLogLevelRewriteLog 指令.现在它们都与单个 LogLevel 指令捆绑在一起(参见 LogFiles 文档),它支持带有前缀和 trace[1-8] 常量的特定于模块的日志级别.要专门为重写模块设置最高级别的日志记录,您现在可以使用以下内容:

As of version 2.4, Apache no longer allows the RewriteLogLevel and RewriteLog directives. Now they're all bundled with the single LogLevel directive (see Log Files documentation), which supports module-specific log levels with prefixes and trace[1-8] constants. To set the highest level of logging specifically for the rewrite module, you now use the following:

LogLevel warn rewrite:trace8

这篇关于如何调试htaccess重写脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆