How to debug htaccess rewrite script

前端 未结 3 584
误落风尘
误落风尘 2020-11-27 05:40

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

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 06:29

    You can set RewriteLog directive in your virtualhost configuration It will write necessary info to the file specified by you.

    RewriteLog "/usr/local/var/apache/logs/rewrite.log"
    

    Further, use RewriteLogLevel directive to control the amount of logging

    RewriteLogLevel 3
    

    read through

提交回复
热议问题