response.redirect problem

G

gtea

I am using response.redirec to do the url redirection on my login page. The
login page is under http://myURL/test/dir1/login.aspx, when the user login
successfully, the login page redirects the user to the default.apsx page,
which is under http://myURL/test/dir1/default.aspx.

When I enter the IP address of myURL in the address bar, the redirection
works perfectly fine, but if I enter myURL (which is hostname) in the address
bar, the redirection in login page doesn't work anymore, the login page just
gets refreshed.

Does anyone has ideas how to solve this problem? Thanks a lot!
 
C

Curt_C [MVP]

gtea said:
I am using response.redirec to do the url redirection on my login page. The
login page is under http://myURL/test/dir1/login.aspx, when the user login
successfully, the login page redirects the user to the default.apsx page,
which is under http://myURL/test/dir1/default.aspx.

When I enter the IP address of myURL in the address bar, the redirection
works perfectly fine, but if I enter myURL (which is hostname) in the address
bar, the redirection in login page doesn't work anymore, the login page just
gets refreshed.

Does anyone has ideas how to solve this problem? Thanks a lot!

The server may not have the DNS pointer.
Check the network settings on the server or add a hostfile entry
 
G

gtea

Hi Curt,

Thanks for your response. For whatever reason, the problem got sovled by
itself! All I did just deleted all the cookies in the temp files. I don't
think it was relevant to the problem. Anyway, the page redirection works now
regardless of the url (ip or hostname)

BTW, I added the myURL hostfile entry (after the problem disappeared)

Thanks!
 
F

Foo Man Chew

BTW, I added the myURL hostfile entry (after the problem disappeared)

Now, make sure this works from another machine as well. Knowing that the
page works on one machine only is pretty useless, unless it is only ever
going to be accessed by that one machine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top