Adding ability to host the application in a subdirectory of the hostname.

Can you please check if I had done the right thing?