The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Only through include
CodeKing
post Jan 27 2008, 03:27 AM
Post #1


Advanced Member
****

Group: Members
Posts: 175
Joined: 12-September 06
Member No.: 118



Is there any way to edit the .htaccess file to only allow certain files to be used via PHP include or require, but not from a browser?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Jan 27 2008, 03:56 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



If I understand you correctly - you want it so the included files (say "password.inc") can't be read from a browser?

Simply make the (included) file inaccessible. Either set Apache not to show it, or (simpler) put the include files in some directory outside the document tree.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 12:26 AM