Web Servers on Unix and Linux - apache .htaccess problem

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > July 2005 > apache .htaccess problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author apache .htaccess problem

2005-07-31, 5:52 pm

I want to deny access for every file which is NOT in the form:

*.js
*.css
*.jpg
*.png
index.php
book.php
vote.php
comments.php


I try 2 files but noone works ;-(((((

------- file 1 -----------------
<Files ~
"[^(^(.+\.(js|css|jpg|png)|index\.php|vote\.php|book\.php|comments\.php)$)]">
Order Allow,Deny
Deny from all
</Files>
------- file 2 -----------------
Order Allow,Deny
Deny from all

<Files ~
"(\.(js|css|jpg|png)|^(index\.php|vote\.php|book\.php|comments\.php))$">
Order Deny,Allow
Allow from all
</Files>
--------------------------------

Where is the problem?

I have "AllowOverride All" in httpd.conf
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com