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

查看:215
本文介绍了如何调试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版本,阿帕奇不再允许 RewriteLogLevel RewriteLog 指令。现在,他们都捆绑在单个的LogLevel 指令(见的日志文件文件),它支持特定模块的日志级别以prefixes和跟踪[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天全站免登陆