CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Preventing view of <page>.html

Print topic Send  topic

Author Message
Ubaidullah
Posted: 01/04/2003, 6:14 AM

How can I prevent web surfers from viewing the template (.html) files?

e.g. I have index.php with the corresponding index.html page.

If the user types in url/index.html, then the template page is served. How to stop it? Must be a config option in httpd.conf, but which is it.

Using Apache/PHP/MySQL

Thanks in advance...
Ubaidullah
Posted: 01/04/2003, 8:29 AM

BTW, I am putting DirectoryIndex command in .htaccess to make the index.php come instead of index.html come up as default. But still the user can change the .php to .html and see the template. I need to prevent this. Any idea what to do?

Thanks & Regards...

lukas rueegg
Posted: 01/06/2003, 8:51 AM

you should be able to do it in your .htaccess file.

you have to use the 'Allow' and the '<FilesMatch>' directives. then you could deny the access to any .html-files.

regards
lukas.

   


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

Web Database

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.