D
D
Dmitry Kulikov2015-08-04 17:35:55
Apache HTTP Server
Dmitry Kulikov, 2015-08-04 17:35:55

Is it possible to deny access to everything except one file in .htaccess?

The site has a folder /folder/
It has a file index.php , .htaccess and a few more folders such as /folder/folder2/
It has the following lines

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /folder/index.php [L]

DirectoryIndex index.php

How can I add a file so that access is only to index.php?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ShamblerR, 2015-08-05
@ShamblerR

rewrite cond request uri !url

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question