change path of config.rb and enhance code to compatiable to relative url