Jump to content

Make your design YOURS


Jordan

Recommended Posts

Not surprisingly, I found yet a better way to do this (for a global configuration):

 

in /usr/local/apache/conf, remove the previous entries (in my last post), and add:

 

<Directory "/">
Options All
AllowOverride All
<Files ~ ".(pl|txt|tpl|inc)$">
Order allow,deny
Deny from all
Satisfy All
</Files>
</Directory>

 

This will deny direct access to the following filetypes (you can add more as you like):

pl (perl)

txt (text)

tpl (template)

inc (include)

 

to add another, or remove one, it's very simple. Edit the line

<Files ~ ".(pl|txt|tpl|inc)$">

to add the extension (or remove it), as ext| . If you remove one, don't forget to remove the pipe (|) after it.

 

Of course, this is server wide, so you don't need the .htaccess mods in the directory.

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated