mirror of
https://github.com/amyjko/cooperative-software-development
synced 2024-12-25 21:58:15 +01:00
19 lines
No EOL
628 B
ApacheConf
19 lines
No EOL
628 B
ApacheConf
RewriteEngine On
|
|
|
|
# Set the path to prepend to all rewrites.
|
|
|
|
RewriteBase /ajko/books/cooperative-software-development
|
|
|
|
# Define missing mjs MIME type.
|
|
AddType application/javascript .mjs
|
|
|
|
# Redirect paths with trailing slash to paths without, then stop.
|
|
RewriteRule ^(.*)/$ $1 [L,R=301]
|
|
|
|
# Does adding .html to any requests resolve to a file with .html? Serve that with the query string, then stop.
|
|
RewriteCond %{REQUEST_FILENAME}.html -f
|
|
RewriteRule ^(.*)$ $1.html [L,QSA]
|
|
|
|
# If the filename is not a file, rewrite to index but preserve the query string.
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteRule (.*) index.html [L,QSA] |