Skip to content

Commit

Permalink
Update instructions for making Apache enforce HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw authored Jan 14, 2024
1 parent cf9b720 commit 98e014f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/guide/server-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ RewriteRule ^.*$ /somedir/yourls-loader.php [L]

### Redirect everything from HTTP to HTTPS

Add this extra line right after the `RewriteBase` line: `RewriteCond %{HTTPS} !=on`
(Example [here](https://github.com/YOURLS/YOURLS/issues/2578#issuecomment-554732802))
Add `RewriteCond %{HTTPS} off` and `RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]`
before the `RewriteBase /` rule in your Apache configuration.
(Full example [here](https://github.com/YOURLS/YOURLS/issues/2578#issuecomment-612451531))

### Give YOURLS its own directory

Expand Down

0 comments on commit 98e014f

Please sign in to comment.