Today marked the official launch of my new website, but I've encountered some unexpected issues with the .htaccess file. Despite my best efforts to address them prior to going live, it appears that there are still unresolved problems.
You can visit the site at:
The current setup of my .htaccess file is as follows:
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
Options -Indexes
DirectoryIndex index.php /errors/404.html
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ /%1 [R=301,L]
While I pieced this .htaccess file together using information found online and it appears to be functioning, I don't have a thorough understanding of its workings.
The issue I'm encountering relates to URL capitalization. For instance, when I enter "OliverCrow.com/About" everything functions smoothly; however, variations in casing (e.g., "OliverCrow.com/about") or including trailing slashes disrupt the layout by failing to load CSS properly. It seems like adjusting the .htaccess file could remedy this problem, although I lack the know-how to do so.