0

My .htaccess file from my root web server is:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]

When i access www.mysite.com/images or /javascript, the directory layout is showed, and all my images and assets are displayed. My application entry script is index.php. How can i deny this access?

Thanks.

1 Answer 1

1

I do not know if .htaccess or mod_rewrite is the best tool for this task.

You can do several things. Since you are using php, try putting the following code in index.php in each of your sub-directories ( javascript/index.php )

<?php header( 'Location: /' ) ; ?>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .