mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-23 10:12:38 +01:00
Use mod_alias for redirection
It’s a less resource-intensive alternative to mod_rewrite.
This commit is contained in:
parent
76667ffcf9
commit
e52132c85b
1 changed files with 5 additions and 9 deletions
|
@ -659,13 +659,12 @@ or the root domain:
|
||||||
# Higher than the max message size of 4096 bytes
|
# Higher than the max message size of 4096 bytes
|
||||||
LimitRequestBody 102400
|
LimitRequestBody 102400
|
||||||
|
|
||||||
# Enable mod_rewrite (requires "a2enmod rewrite")
|
|
||||||
RewriteEngine on
|
|
||||||
|
|
||||||
# Redirect HTTP to HTTPS, but only for GET topic addresses, since we want
|
# Redirect HTTP to HTTPS, but only for GET topic addresses, since we want
|
||||||
# it to work with curl without the annoying https:// prefix
|
# it to work with curl without the annoying https:// prefix (requires "a2enmod alias")
|
||||||
RewriteCond %{REQUEST_METHOD} GET
|
<If "%{REQUEST_METHOD} == 'GET'">
|
||||||
RewriteRule ^/([-_A-Za-z0-9]{0,64})$ https://%{SERVER_NAME}/$1 [R,L]
|
RedirectMatch permanent "^/([-_A-Za-z0-9]{0,64})$" "https://%{SERVER_NAME}/$1"
|
||||||
|
</If>
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
|
@ -686,9 +685,6 @@ or the root domain:
|
||||||
# Higher than the max message size of 4096 bytes
|
# Higher than the max message size of 4096 bytes
|
||||||
LimitRequestBody 102400
|
LimitRequestBody 102400
|
||||||
|
|
||||||
# Enable mod_rewrite (requires "a2enmod rewrite")
|
|
||||||
RewriteEngine on
|
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue