Merged regex and static redirects, added comments

This commit is contained in:
Rasmus Malver 2018-04-23 06:57:59 +00:00
parent f0fc8ec04f
commit 130fe1de94

View file

@ -2,16 +2,28 @@
layout: null layout: null
permalink: .htaccess permalink: .htaccess
--- ---
# Redirect to new locations # Kickass regexian redirects enabled
Redirect /vedtaegter.pdf /assets/files/vedtaegter.pdf RewriteEngine on
Redirect /PapesBrev.pdf /assets/files/PapesBrevTilTeleindustrien.pdf
Redirect /PapeLyver.pdf /assets/files/PapeLyver.pdf
Redirect /FT-notat.pdf /assets/files/FT-notat.pdf
# template for redirects (never uncomment and use this line as is!) # template for static redirects (never uncomment and use this line as is!)
#Redirect / /assets/files/ #Redirect / /assets/files/
# Kickass regexian redirects # template for regex redirects.
RewriteEngine on # The flag NC makes regex case-insensitive. See https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_NC
RewriteRule "^st[aeæÆ]+vning" "/assets/docs/staevning.pdf" [NC] # Remember to consider adding opening "^" and closing "$" characters to avoid grabbing too much. Eg.: "^pape" will match "pape", but also "papelyver", "papeIsGod", "papeIsOurPappa" etc. "Pape$" will match "superPape", "wonderPape" etc. Solution is "^pape$".
RewriteRule "^papelyver" "/assets/videos/pape.mp4" [NC] #RewriteRule "regex" "path" [FLAGS]
# Vedtægter
Redirect /vedtaegter.pdf /assets/files/vedtaegter.pdf
RewriteRule "^vedt[æÆae]{1,2}gter$" "/assets/files/vedtaegter.pdf" [NC]
# Stævning
RewriteRule "^st[aeæÆ]{1,2}vning$" "/assets/docs/staevning.pdf" [NC]
# Video om at ingen har ændret deres logning:
RewriteRule "^papelyver$" "/assets/videos/pape.mp4" [NC]
RewriteRule "^l[øØoe]{1,2}gnerpape$" "/assets/videos/pape.mp4" [NC]
# Brev til Retsudvalget 2018
RewriteRule "^PapeLyver.pdf$" "/assets/files/PapeLyver.pdf" [NC]
RewriteRule "^PapeTilRetsudvalget$" "/assets/files/PapeLyver.pdf" [NC]