Improved doc root input filter