organize the .htaccess file a bit
All checks were successful
Web/pipeline/head This commit looks good
All checks were successful
Web/pipeline/head This commit looks good
This commit is contained in:
parent
5f565cffbb
commit
3f5e2ac4de
1 changed files with 18 additions and 11 deletions
29
.htaccess
29
.htaccess
|
@ -1,25 +1,32 @@
|
||||||
Options -Indexes
|
Options -Indexes
|
||||||
|
ErrorDocument 404 /404.html
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteBase /
|
RewriteBase /
|
||||||
|
|
||||||
|
# redirect from base urls to their .html files
|
||||||
RewriteCond %{REQUEST_FILENAME}.html -f
|
RewriteCond %{REQUEST_FILENAME}.html -f
|
||||||
RewriteRule (.*) $1.html [L]
|
RewriteRule (.*) $1.html [L]
|
||||||
|
|
||||||
RewriteRule ^discord/?$ "https://discord.gg/Uy2ZM9X" [R=301,L]
|
# legacy redirects (for deleted stuff)
|
||||||
|
RewriteRule ^blog-(.*)$ "https://ellpeck.de/blog/$1" [R=301,L]
|
||||||
|
RewriteRule ^minecraft-stuff/?$ "https://ellpeck.de/projects" [R=301,L]
|
||||||
|
RewriteRule ^mc/?$ "https://ellpeck.de/projects" [R=301,L]
|
||||||
|
|
||||||
|
# anchor redirects (need NE = no escaping for the hash symbol)
|
||||||
|
RewriteRule ^projects/?$ "https://ellpeck.de/#projects" [NE,R=301,L]
|
||||||
|
RewriteRule ^privacy/?$ "https://ellpeck.de/#privacy" [NE,R=301,L]
|
||||||
|
RewriteRule ^impressum/?$ "https://ellpeck.de/#impressum" [NE,R=301,L]
|
||||||
|
RewriteRule ^blog/?$ "https://ellpeck.de/#blog" [NE,R=301,L]
|
||||||
|
|
||||||
|
# actually additions redirects
|
||||||
RewriteRule ^actaddchangelog/?$ "https://github.com/Ellpeck/ActuallyAdditions/blob/main/update/changelog.md" [R=301,L]
|
RewriteRule ^actaddchangelog/?$ "https://github.com/Ellpeck/ActuallyAdditions/blob/main/update/changelog.md" [R=301,L]
|
||||||
RewriteRule ^actadddownload/?$ "https://minecraft.curseforge.com/projects/actually-additions/files" [R=301,L]
|
RewriteRule ^actadddownload/?$ "https://minecraft.curseforge.com/projects/actually-additions/files" [R=301,L]
|
||||||
RewriteRule ^actaddlicense/?$ "https://github.com/Ellpeck/ActuallyAdditions/blob/main/LICENSE.md" [R=301,L]
|
RewriteRule ^actaddlicense/?$ "https://github.com/Ellpeck/ActuallyAdditions/blob/main/LICENSE.md" [R=301,L]
|
||||||
RewriteRule ^actadd/?$ "https://minecraft.curseforge.com/projects/actually-additions" [R=301,L]
|
RewriteRule ^actadd/?$ "https://minecraft.curseforge.com/projects/actually-additions" [R=301,L]
|
||||||
RewriteRule ^projects/?$ "https://ellpeck.de/#projects" [NE,R=301,L]
|
|
||||||
RewriteRule ^impressum/?$ "https://ellpeck.de/#impressum" [NE,R=301,L]
|
# other permanent redirects
|
||||||
RewriteRule ^privacy/?$ "https://ellpeck.de/#privacy" [NE,R=301,L]
|
RewriteRule ^discord/?$ "https://discord.gg/Uy2ZM9X" [R=301,L]
|
||||||
RewriteRule ^blog/?$ "https://ellpeck.de/#blog" [NE,R=301,L]
|
|
||||||
RewriteRule ^blog-(.*)$ "https://ellpeck.de/blog/$1" [NE,R=301,L]
|
|
||||||
RewriteRule ^mc/?$ "https://ellpeck.de/minecraft-stuff" [R=301,L]
|
|
||||||
RewriteRule ^minecraft-stuff/?$ "https://ellpeck.de/projects" [R=301,L]
|
|
||||||
RewriteRule ^yt/?$ "https://www.youtube.com/c/ellpeck" [R=301,L]
|
RewriteRule ^yt/?$ "https://www.youtube.com/c/ellpeck" [R=301,L]
|
||||||
RewriteRule ^wishlist/?$ "https://www.amazon.de/hz/wishlist/ls/LZO9Y2Z3VJ5Q?&sort=default" [R=301,L]
|
RewriteRule ^wishlist/?$ "https://www.amazon.de/hz/wishlist/ls/LZO9Y2Z3VJ5Q?&sort=default" [R=301,L]
|
||||||
RewriteRule ^fftranslate/?$ "https://poeditor.com/join/project/ElzC23ecB6" [R=301,L]
|
RewriteRule ^fftranslate/?$ "https://poeditor.com/join/project/ElzC23ecB6" [R=301,L]
|
||||||
|
|
||||||
ErrorDocument 404 /404.html
|
|
Loading…
Reference in a new issue