Skip to content

Instantly share code, notes, and snippets.

@jgmac1106
Created October 4, 2019 10:31
Show Gist options
  • Save jgmac1106/96da13db35b1d408e90c00178893b914 to your computer and use it in GitHub Desktop.
Save jgmac1106/96da13db35b1d408e90c00178893b914 to your computer and use it in GitHub Desktop.
my homepage htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteCond %{HTTPS_HOST} ^jgregorymcverry.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.html [NC,L]
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]+)$ $1.php [NC,L]
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment