5
0
mirror of https://git.coop/cotech/website.git synced 2024-11-24 23:53:07 +00:00

.htaccess file to serve /example.html as /example

This commit is contained in:
Chris Croome 2018-12-01 17:13:51 +00:00
parent 9d882bc4a3
commit a24a6123cb
4 changed files with 64 additions and 0 deletions

16
_coops/htaccess Normal file
View File

@ -0,0 +1,16 @@
---
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]

16
_services/htaccess Normal file
View File

@ -0,0 +1,16 @@
---
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]

16
_technologies/htaccess Normal file
View File

@ -0,0 +1,16 @@
---
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]

16
htaccess Normal file
View File

@ -0,0 +1,16 @@
---
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]