Enabling the redirect to a homepage if no pathname specified