contact
This commit is contained in:
35
.htaccess
35
.htaccess
@@ -6,3 +6,38 @@
|
||||
AddHandler application/x-httpd-ea-php82___lsphp .php .php8 .phtml
|
||||
</IfModule>
|
||||
# php -- END cPanel-generated handler, do not edit
|
||||
|
||||
|
||||
# RewriteEngine On
|
||||
|
||||
# # Remove .php extension from URLs (e.g., /contactt -> contact.php)
|
||||
# RewriteCond %{REQUEST_FILENAME} !-d
|
||||
# RewriteCond %{REQUEST_FILENAME}\.php -f
|
||||
# RewriteRule ^(.*)$ $1.php [L]
|
||||
|
||||
# # Redirect direct access to .php files to clean URLs (optional)
|
||||
# RewriteCond %{THE_REQUEST} \s/+(.*?)\.php[\s?] [NC]
|
||||
# RewriteRule ^ /%1 [R=301,L,NE]
|
||||
|
||||
|
||||
|
||||
<Files "mailContact.php">
|
||||
RewriteEngine Off
|
||||
</Files>
|
||||
|
||||
|
||||
RewriteEngine On
|
||||
DirectoryIndex index.php
|
||||
|
||||
# 1. Redirect any index.php request to its directory URL
|
||||
RewriteCond %{THE_REQUEST} \s/(.*)index\.php[\s?] [NC]
|
||||
RewriteRule ^(.*)index\.php$ /%1 [R=301,L]
|
||||
|
||||
# 2. Remove .php extension from URLs (e.g., /contactt -> contact.php)
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME}\.php -f
|
||||
RewriteRule ^(.*)$ $1.php [L]
|
||||
|
||||
# 3. Redirect direct access to .php files to clean URLs (optional)
|
||||
RewriteCond %{THE_REQUEST} \s/+(.*?)\.php[\s?] [NC]
|
||||
RewriteRule ^ /%1 [R=301,L,NE]
|
||||
|
Reference in New Issue
Block a user