Added subdirectory support for proxy url in factory