Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avoid Flie Name Browsing 1

Status
Not open for further replies.

murugesanks

Programmer
Jan 25, 2001
48
0
0
US
How to avoid Directory Browsing.(Means, If somebody type the file name of my site in address bar, the page should not come. They should browse my site via links only i.e through my homepage only.) How to avoid that. I am using IIS,ASP,SQL Server. How to do this. Is there any option in IIS.

Murugesan
 
On top of one children page (not home page), try the following code, if this works add the same code to all children pages.
<%If session(&quot;validuser&quot;)<>&quot;yes&quot; then
Response.Redirect &quot;yourhomepage.asp&quot; or &quot;yourloginpage.asp&quot;
End If
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top