take in consideratin port number in the redirect done in BaseModel class