I want to redirect example.com/subdir to example.com/index.php?strana=subdir - it has no problems, if subdir "subdir" does not exists. But if subdir exists, it displays page 403 - forbidden due to denied directory listing. How can I redirect example.com/subdir to example.com/index.php?strana=subdir, when subdir exists? My .htaccess RewriteCond %{REQUEST_URI} !^\/admin\/?$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\/].[^\/]*)$ %{DOCUMENT_ROOT}/?strana=$1 [L,QSA,T=application/x-httpd-php,NC]