Created
December 22, 2021 15:53
-
-
Save terryupton/0427103c40e338bae0308273d5b81d8c to your computer and use it in GitHub Desktop.
Revisions
-
terryupton created this gist
Dec 22, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ <IfModule mod_rewrite.c> # ------------------------------------------------------------------------------ # | Exclude directories from the rewrite rules | # ------------------------------------------------------------------------------ # RewriteRule ^eShots - [L] # ------------------------------------------------------------------------------ # | Rewrite engine | # ------------------------------------------------------------------------------ # Turning on the rewrite engine and enabling the `FollowSymLinks` option is # necessary for the following directives to work. Options +FollowSymlinks RewriteEngine On RewriteBase / # ------------------------------------------------------------------------------ # | SETUP ANY SHORT PATHS | # ------------------------------------------------------------------------------ # Redirect 301 /biography.htm /biography/ # RewriteRule ^(.*)\.htm$ $1 [L] # ------------------------------------------------------------------------------ # | Add trailing slash to urls | # ------------------------------------------------------------------------------ RewriteCond %{REQUEST_METHOD} !POST [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$ RewriteRule ^(.*)$ $1/ [R=301,L] # ------------------------------------------------------------------------------ # | CRAFT | # ------------------------------------------------------------------------------ # Send would-be 404 requests to Craft RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC] RewriteRule (.+) index.php?p=$1 [QSA,L] </IfModule>