0
A project that I am newly working on has been around for years, and it has managed to accumulate several hundred rather complex RewriteRule
s within the Apache conf files.
When working with some files, I have been able to figure out which rules affect them.
However, in other cases I am completely stuck at figuring it out. My method so far has been to manually look through the various conf files, and grep
them for certain keywords.
Is there a better way to do this?
Some of the things which I can think of are:
- Is there a command or REPL where I can enter a path, and it return that name of the file that it serves?
- Is there a tool that will let you do the above, and also highlight which lines in the conf files re-wrote that rule?
- Is there a way to inspect the log files to determine what the input path and corresponding file served path were?
... but I am not sure where to begin with any of these.
1Have you enabled
RewriteLog
? This is the easiest way to follow what rewrites are happening. – Paul – 2014-03-12T00:44:14.133