cooperative-software-develo.../.htaccess
2023-02-11 14:03:39 -08:00

19 lines
604 B
ApacheConf

RewriteEngine On
# Set the path to prepend to all rewrites.
RewriteBase /ajko/books/cooperative-software-development
# Remove the ending trailing slash from any requests to avoid resolving to directory listings
RewriteRule ^(.*)/$ $1.html
# Append .html to any requests with or without a trailing slash that resolve to a file with .html.
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [L,QSA]
# If we're processing a path that isn't a file or a directory, rewrite to index but preserve the query string.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) index.html [L,QSA]