Skip to content

Commit

Permalink
Remove trailing slash from URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolapps committed Oct 29, 2022
1 parent e18c374 commit 117c2a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ RewriteEngine on
RewriteCond %{HTTP_HOST} ^ettlin\.(.*)$ [NC]
RewriteRule ^(.*)$ https://nicolas.ettlin.%1%{REQUEST_URI} [R=301,QSA,NC,L]

# Remove trailing slash
# https://stackoverflow.com/a/21417551/4652564
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R]

# Remove .html from URLs
# https://stackoverflow.com/a/34726322/4652564
RewriteEngine on
Expand Down

0 comments on commit 117c2a4

Please sign in to comment.