-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding htaccess for cryptograss.live
- Loading branch information
Showing
2 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,9 +118,4 @@ pipeline { | |
} | ||
} | ||
|
||
post { | ||
always { | ||
cleanWs() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Disable the automatic trailing slash addition by mod_dir | ||
DirectorySlash Off | ||
|
||
# Enable the RewriteEngine | ||
RewriteEngine On | ||
|
||
# Rule 1: Serve any URL without .html by appending .html if the corresponding .html file exists | ||
RewriteCond %{REQUEST_FILENAME}\.html -f | ||
RewriteRule ^(.*[^/])$ $1.html [L] | ||
|
||
# Rule 2: Allow requests to existing directories and files without .html to proceed as normal | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule ^ - [L] | ||
|
||
# Redirect .html URLs to the clean version | ||
RewriteCond %{THE_REQUEST} \s(.+)\.html\s [NC] | ||
RewriteRule ^(.*)\.html$ /$1 [R=301,L] |