Skip to content

Commit

Permalink
Remove unnecessary code from .htaccess file
Browse files Browse the repository at this point in the history
  • Loading branch information
Web-Jose committed Feb 2, 2024
1 parent 4d9bfb2 commit ffd2bc5
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
ErrorDocument 404 /404.html

<Files "contact.php">
# Ensure that the PHP file is being handled by the PHP handler, this is usually the default
SetHandler application/x-httpd-php

# Optionally, ensure that the PHP file can only be accessed via your website's form
Order Deny,Allow # Deny all, then allow from specific domain
Deny from all # Deny all
Allow from codebyjose.com # Allow from specific domain
</Files>

# If using mod_rewrite to rewrite URLs, ensure it's not interfering with access to contact.php
<IfModule mod_rewrite.c>
RewriteEngine On
# Exclude contact.php from being rewritten
RewriteCond %{REQUEST_FILENAME} !-f # If the request is not for a file
RewriteCond %{REQUEST_FILENAME} !-d # If the request is not for a directory
RewriteCond %{REQUEST_URI} !^/contact\.php$ # If the request is not for contact.php
</IfModule>

0 comments on commit ffd2bc5

Please sign in to comment.