Files
Global-Jain/.htaccess
2025-11-05 10:37:10 +05:30

29 lines
801 B
ApacheConf

<IfModule mod_rewrite.c>
RewriteEngine On
# ✅ Redirect to HTTPS (no typo, correct domain)
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://lightyellow-mule-306456.hostingersite.com%{REQUEST_URI} [L,R=301]
# ✅ Handle Laravel front controller
RewriteRule ^$ public/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ public/index.php [L]
</IfModule>
# Disable directory listing
Options -Indexes
# Block hidden files and folders (.env, .git, etc.)
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
# Block specific sensitive files
<FilesMatch "(artisan|composer\.json|composer\.lock|env|\.gitignore|\.gitattributes|\.env\.example)">
Order allow,deny
Deny from all
</FilesMatch>