Support REDIRECT_PATH_INFO suggested by @felixjingga

This expands the idea to the rest of the system (API and AJAX)