Your case seems to be a treasure hunt game. Follow the clues:
http://www.sharif.ir
returns HTTP 200, and the page contains an automatic html redirection (meta http-equiv=refresh) to page/c
(http://www.sharif.ir/c
)http://www.sharif.ir/c
returns HTTP 302, which redirects tohttp://www.sharif.ir/c/portal/layout
http://www.sharif.ir/c/portal/layout
returns HTTP 302, which redirects tohttp://www.sharif.ir/home
Welcome to your destination ! :)
At first, tou need to parse for the meta refresh tag in the result header of the first page to get the location (content attribute : url=<relative path>
).