Home > Web Front-end > HTML Tutorial > This function is annoying: if the browser cannot reach a certain URL, it will automatically redirect to a certain URL, such as the ISP homepage. How to prevent this? _html/css_WEB-ITnose

This function is annoying: if the browser cannot reach a certain URL, it will automatically redirect to a certain URL, such as the ISP homepage. How to prevent this? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:10:51
Original
826 people have browsed it

This function is annoying: if the browser cannot reach a certain URL, it will automatically redirect to a certain URL, such as the ISP homepage. How to prevent it?
--


Reply to discussion (solution)

For example, users who are not logged in are not allowed to view certain pages and automatically jump to login Page

You can store the user ID in the Session when logging in. After logging in, check whether the user's ID is in the Session. If not, it will be considered as not logged in, and use Response.Redirect to jump to the login page. If so, browse the page normally.

Let me explain this problem in detail:
For example, if I enter a URL that does not exist: teetertyrtyrtuu
the browser will automatically direct to a fixed page:
http://tjdnserror2.wo.com .cn:8080/issueunziped/baidutj120504/index2.jsp?UserUrl=tyrtyy
What should appear is: Unable to link to the page
How to remove this fixed:
http://tjdnserror2.wo.com.cn :8080/

There is a location object in javascript and the attribute url inside should be able to help you

Thank you upstairs, but this is not the answer you need
I also looked at my own machine The HOST file on has not been changed

There is a location object in javascript and the attribute url in it should be able to help you
I have to think of a solution myself. If no one answers again, I will give you points after 2 days
Although this post has no useful information for everyone

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template