Answers for "htaccess if index not found redirect"

0

htaccess if index not found redirect

//Redirect to a URL via htaccess if index.(html|php) doesn't exist
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}/index\.(html|php) !-f
RewriteRule ^ http://example.com/something-blew-up.html [R=302]
Posted by: Guest on October-17-2021

Browse Popular Code Answers by Language