Updated: 14 February 2025
Test your htaccess rewrite rules https://htaccess.madewithlove.com/
Redirect everything to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Serve a pdf document when a directory is requested
# DirectoryIndex: sets the file that Apache will serve if a directory is requested.
<IfModule dir_module>
# DirectoryIndex index.html
DirectoryIndex math-study.pdf
</IfModule>