CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Stop directory listings and redirect to login page

Print topic Send  topic

Author Message
dawber

Posts: 25
Posted: 01/14/2005, 11:25 PM


Without logging in, if the user tries to directly access any of the php pages in the xyz directory,
https:// ... /xyz/anyFile.php
then he/she is automatically taken to the login.php page
https:// ... /xyz/login.php
because I have set it up that way.

But when the user enters the URL with only the xyz directory and no file name
https:// ... /xyz/
then the entire directory listing still shows up in the browser.

How can I stop this directory listing display and
force the user back to the login page?

View profile  Send private message
mrachow


Posts: 509
Posted: 01/14/2005, 11:48 PM

This happens when no default page exists.
If a user enters the URL only a list of default pages is searched. If not of these files exist the directory is shown.
So you can add your extry page to the list of default pages for your web site.
Or create a file with the default name (most often index.html/index.htm/index.php) and route to your page.
Or rename your entry page.
_________________
Best regards,
Michael
View profile  Send private message
dawber

Posts: 25
Posted: 01/15/2005, 1:21 AM

ok. That helped.
Renamed the login page to index.
That took care of it.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.