Created
September 3, 2022 06:52
-
-
Save finalwebsites/ce77b691730e4d3a0ff7884ef7e6b23c to your computer and use it in GitHub Desktop.
Ignore missing files and report a 404 status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this code to your .htaccess file (Apache based servers only) | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|gif|bmp|ico|css|js|swf|htm|html|txt|php|asp|aspx)$ [NC] | |
RewriteRule .* - [L,R=404] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment