RewriteCond check if directory exists with an index file
snippet in htaccess

RewriteCond check if directory exists with an index file

user8360

RewriteCond %{REQUEST_FILENAME}/index\.php !-f
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ redirect.php [QSA,L]

RewriteCond check if directory exists with an index file

user6862

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/$1/index.php !-f
RewriteRule ^(.*?)/?$ redirect.php [L]