mirror of
https://github.com/amyjko/cooperative-software-development
synced 2024-12-25 21:58:15 +01:00
Fixed .htaccess syntax errors.
This commit is contained in:
parent
380348e73d
commit
3d4e6ee4bd
1 changed files with 15 additions and 3 deletions
18
.htaccess
18
.htaccess
|
@ -1,7 +1,19 @@
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
# Set the path to prepend to all rewrites.
|
# Set the path to prepend to all rewrites.
|
||||||
|
|
||||||
RewriteBase /ajko/books/cooperative-software-development
|
RewriteBase /ajko/books/cooperative-software-development
|
||||||
|
|
||||||
# Redirect all non-directory paths to index.html for single-page routing,
|
# 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
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteRule (.*) index.html [L,QSA]
|
||||||
RewriteRule (.*) index.html [L,QSA]
|
|
||||||
|
|
Loading…
Reference in a new issue