5
0
mirror of https://git.coop/cotech/website.git synced 2024-11-09 01:30:50 +00:00
cotech-website/htaccess
2018-12-01 17:13:51 +00:00

17 lines
433 B
Plaintext

---
layout: none
permalink: .htaccess
---
# Serve requests for /example using the files at /example.html
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
# Redirect requests for /example.html to /example
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteCond %{REQUEST_URI} ^(.+)\.html$
RewriteRule (.*)\.html$ /$1 [R=301,L]