2025-02-20 13:49:42 +05:45
|
|
|
# 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]
|
|
|
|
|
2025-02-21 15:37:20 +05:45
|
|
|
<Files "mailBooking.php">
|
|
|
|
RewriteEngine Off
|
|
|
|
</Files>
|
|
|
|
<Files "mailCContact.php">
|
|
|
|
RewriteEngine Off
|
|
|
|
</Files>
|
|
|
|
|
2025-02-19 18:04:31 +05:45
|
|
|
RewriteEngine On
|
2025-02-20 13:49:42 +05:45
|
|
|
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]
|
2025-02-19 18:04:31 +05:45
|
|
|
|
2025-02-20 13:49:42 +05:45
|
|
|
# 3. Redirect direct access to .php files to clean URLs (optional)
|
|
|
|
RewriteCond %{THE_REQUEST} \s/+(.*?)\.php[\s?] [NC]
|
|
|
|
RewriteRule ^ /%1 [R=301,L,NE]
|