fsfe-website/.htaccess

195 lines
9.8 KiB
ApacheConf
Raw Normal View History

RewriteEngine On
# Favicon
2019-11-11 14:19:58 +01:00
RewriteRule ^favicon.ico /graphics/fsfe.ico [R=301,L]
RewriteRule ^graphics/fsfeurope.ico /graphics/fsfe.ico [R=301,L]
# =============================================================================
# SHORT URLS
# =============================================================================
2019-11-11 14:10:24 +01:00
# Redirect
2019-11-11 14:19:58 +01:00
RewriteRule ^translate /contribute/translators/ [R=301,L]
2019-11-11 14:10:24 +01:00
# AskYourCandidates
2019-11-11 14:19:58 +01:00
RewriteRule ^campaigns/ayc(.*) /campaigns/askyourcandidates$1 [R=301,L]
# NoCloud campaign, as printed on posters
2019-11-11 14:19:58 +01:00
RewriteRule ^nocloud(/.*)? /activities/nocloud$1 [R=301,L]
2019-11-11 14:10:24 +01:00
# Promotion material order
2019-11-11 14:19:58 +01:00
RewriteRule ^promo(/.*)? /contribute/spreadtheword$1 [R=301,L]
2019-11-11 14:10:24 +01:00
# Convince your friends
2019-11-11 14:19:58 +01:00
RewriteRule ^(cyf|convince).* http://wiki.fsfe.org/ConvinceYourFriends [R=301,L]
# Summit 2016
2019-11-11 14:19:58 +01:00
RewriteRule ^summit16(/.*)?$ https://fsfe.org/community/events/2016/summit/frontpage$1 [R=301,L]
#RewriteRule ^summit16(/.*)?$ https://wiki.fsfe.org/Events/Summit2016/CallForParticipation$1 [R=301,L]
# 15 years of FSFE
2019-11-11 14:19:58 +01:00
RewriteRule ^15(/.*)?$ https://fsfe.org/campaigns/15years/15years$1 [R=301,L]
2018-11-14 18:18:55 +01:00
# EU policies wiki page, e.g. linked from the PMPC brochure
2019-11-11 14:19:58 +01:00
RewriteRule ^fs-policies/?$ https://wiki.fsfe.org/Activities/EU_Policies_overview_FS [R=301,L]
2018-11-14 18:18:55 +01:00
# Share buttons
RewriteRule ^share/?$ /cgi-bin/share.php [NC,L]
# =============================================================================
# CAMPAIGN/TOPIC-SPECIFIC REDIRECTS
# =============================================================================
# Podcast
2019-11-11 14:19:58 +01:00
RewriteRule ^news/podcast/?$ /news/podcast.html [R=301,L]
2019-11-11 14:10:24 +01:00
RewriteRule ^news/podcast.rss$ /news/podcast.en.rss [L,R=301]
RewriteRule ^news/podcast-opus.rss$ /news/podcast-opus.en.rss [L,R=301]
2019-10-11 22:27:14 +02:00
# ILoveFS
2019-11-11 15:11:19 +01:00
# TODO each year: update links for next two lines
RewriteRule ^campaigns/ilovefs(/?$|/[^/]*.html$) /campaigns/ilovefs/2019$1 [PT,L]
RewriteRule ^campaigns/ilovefs/latest-report.*$ /news/2019/news-20190329-01.html [R=301,L]
2019-11-11 14:19:58 +01:00
RewriteRule ^campaigns/ilovefs/ilovefs(.*)html$ /campaigns/ilovefs/index$1html [R=301,L]
RewriteRule ^campaigns/ilovefs/(201[2-5])/index(.*)$ /campaigns/ilovefs/$1/ [R=301,L]
RewriteRule ^campaigns/ilovefs/(201[2-5])(/?)$ /campaigns/ilovefs/$1/ilovefs.html [R=301,L]
2019-11-11 14:10:24 +01:00
# old URLs
2019-11-11 14:19:58 +01:00
RewriteRule ^valentine.* /campaigns/ilovefs [R=301,L]
RewriteRule ^vd20.* /campaigns/ilovefs [R=301,L]
RewriteRule ^campaigns/valentine.* /campaigns/ilovefs [R=301,L]
RewriteRule ^campaigns/vd20.* /campaigns/ilovefs [R=301,L]
# Help section
2019-11-11 14:19:58 +01:00
RewriteRule ^help/?$ /contribute/ [R=301,L]
RewriteRule ^help/index(.*) /contribute/contribute$1 [R=301,L]
RewriteRule ^help/help(.*) /contribute/contribute$1 [R=301,L]
RewriteRule ^help/web\.(.*) /contribute/web/web.$1 [R=301,L]
RewriteRule ^help/(.*) /donate/$1 [R=301,L]
# Legal team pages
2019-11-11 15:11:19 +01:00
RewriteRule ^ftf(.*)$ /activities/ftf$1 [R=301,L]
RewriteRule ^legal(.*)$ /activities/ftf$1 [R=301,L]
RewriteRule ^activities/ftf/?$ /activities/ftf/activities.html [R=301,L]
2019-11-11 14:19:58 +01:00
RewriteRule ^activities/ftf/ftf\.(.*)html /activities/ftf/activities.$1html [R=301,L]
RewriteRule ^activities/ftf/index\.(.*)html /activities/ftf/activities.$1html [R=301,L]
2019-11-11 15:11:19 +01:00
RewriteRule ^activities/ftf/rough-guide-for-users(.*)$ /projects/ftf/useful-tips-for-users$1 [R=301,L]
RewriteRule ^activities/ftf/rough-guide-for-vendors(.*)$ /projects/ftf/useful-tips-for-vendors$1 [R=301,L]
RewriteRule ^activities/ftf/contact(.*)$ /contact/contact$1#ftf [NE,R=301]
RewriteRule ^activities/ftf/form(.*)$ /contact/contact$1#ftf [NE,R=301]
2019-11-11 14:19:58 +01:00
RewriteRule ^activities/ftf/network\.(.*)html /activities/ftf/ln.$1html [R=301,L]
RewriteRule ^activities/ftf/recommended\.(.*)html /activities/ftf/licence-questions.$1html [R=301,L]
RewriteRule ^activities/ftf/legal-network-policy\.(.*)html /activities/ftf/ln-rules.$1html [R=301,L]
2019-11-11 15:11:19 +01:00
RewriteRule ^activities/ftf/education.*$ /activities/ftf/services.html [R=301,L]
# =============================================================================
# MOVED PAGES
# =============================================================================
# News
2019-11-11 14:19:58 +01:00
RewriteRule ^news/fsfe-fr-channel.fr.xml /news/news.fr.rss [R=301,L]
RewriteRule ^2009$ /news/2009/nyr.html [R=301,L]
RewriteRule ^2009/$ /news/2009/nyr.html [R=301,L]
2019-11-11 15:11:19 +01:00
RewriteRule ^news/2016/news-20160629-01(.*)$ /news/2016/news-20160630-01$1 [R=301,L]
# Old staff profiles
2019-11-11 15:11:19 +01:00
RewriteRule ^about/bako(/.*)?$ /about/team [R=301,L]
RewriteRule ^about/polvani(/.*)?$ /about/team [R=301,L]
RewriteRule ^about/tuke(/.*)?$ /about/team [R=301,L]
RewriteRule ^people/greve(/.*)?$ /about/greve [R=301,L]
# /en/.*
2019-11-11 14:19:58 +01:00
RewriteRule ^en/layout/set/rss/content/view/full/5116 http://blogs.fsfe.org/ciaran/?feed=rss2 [R=301,L]
RewriteRule ^en/layout/set/rss/content/view/full/5009 http://blogs.fsfe.org/maffulli/?feed=rss2 [R=301,L]
RewriteRule ^en/layout/set/rss/content/view/full/4972 http://blogs.fsfe.org/gerloff/?feed=rss2 [R=301,L]
RewriteRule ^en/layout/set/rss/content/view/full/5971 http://blogs.fsfe.org/jj/?feed=rss2 [R=301,L]
RewriteRule ^en/layout/set/rss/content/view/full/6128 http://blogs.fsfe.org/jj/?feed=rss2 [R=301,L]
RewriteRule ^en/layout/set/rss/content/view/full/4974 http://blogs.fsfe.org/greve/?feed=rss2 [R=301,L]
RewriteRule ^en/news http://fsfe.org/news/ [R=301,L]
RewriteRule ^en/rss/feed/news.xml /news/news.en.rss [R=301,L]
RewriteRule ^en/rss/feed/events.xml /events/events.en.rss [R=301,L]
RewriteRule ^en/content/download/17665/125518/file/gnupg-ccid.rules http://wiki.fsfe.org/Card_howtos/Card_reader_setup_(udev)?action=AttachFile&do=view&target=gnupg-ccid.rules [R=301,L]
RewriteRule ^en/content/download/15872/77909/file/gnupg-ccid http://wiki.fsfe.org/Card_howtos/Card_reader_setup_(udev)?action=AttachFile&do=view&target=gnupg-ccid [R=301,L]
# Other pages
2019-11-11 14:19:58 +01:00
RewriteRule ^support(/.*)? /join [R=301,L]
RewriteRule ^about/members(.*) /about/team$1 [R=301,L]
RewriteRule ^about/community /contact/community.html [R=301,L]
RewriteRule ^(.*)\.no.html /$1.nb.html [R=301,L]
RewriteRule ^(.*)\.no.rss /$1.nb.rss [R=301,L]
RewriteRule ^contact/press(.*) /press/press$1 [R=301,L]
RewriteRule ^standards(.*) /projects/os$1 [R=301,L]
RewriteRule ^education(.*) /projects/education$1 [R=301,L]
RewriteRule ^ftf(.*) /activities/ftf$1 [R=301,L]
RewriteRule ^stacs(.*) /projects/stacs$1 [R=301,L]
RewriteRule ^gbn(.*) /projects/gbn$1 [R=301,L]
RewriteRule ^law/eucd/(.*) /projects/eucd$1 [R=301,L]
RewriteRule ^law(.*) /projects/law$1 [R=301,L]
RewriteRule ^swpat(.*) /projects/swpat$1 [R=301,L]
RewriteRule ^associates/about(.*) /associates/associates$1 [R=301,L]
RewriteRule ^contribute/traineeship(.*) /contribute/internship$1 [R=301,L]
RewriteRule ^contribute/donate(.*) /donate$1 [R=301,L]
RewriteRule ^contact/local(.*) /about/localteams$1 [R=301,L]
2017-10-30 12:10:42 +01:00
# =============================================================================
# FELLOWSHIP AND DONATIONS
# =============================================================================
# Payment
RewriteRule ^/fellowship/paypal$ https://my.fsfe.org/payonline [R=301,L]
RewriteRule ^/fellowship/payonline$ https://my.fsfe.org/payonline [R=301,L]
RewriteRule ^/fellowship/paypal/(.*) https://my.fsfe.org/payonline/$1 [R=301,L]
RewriteRule ^/fellowship/payonline/([^/]*)/(.*) https://my.fsfe.org/payonline/$2 [R=301,L]
RewriteRule ^/fellowship/payonline/(.*) https://my.fsfe.org/payonline/$1 [R=301,L]
RewriteRule ^/fellowship/login/(.*) https://my.fsfe.org/ [R=301,L]
RewriteRule ^/fellowship/join/(.*) https://my.fsfe.org/support [R=301,L]
RewriteRule ^/fellowship/donate/(.*) https://my.fsfe.org/donate [R=301,L]
RewriteRule ^/donate/payonline/(.*) https://my.fsfe.org/payonline/$1 [R=301,L]
# Old /fellowship pages
2019-11-11 14:19:58 +01:00
RewriteRule ^/fellowship/donate.* https://my.fsfe.org/donate [R=301,L]
RewriteRule ^/fellowship/join.* https://my.fsfe.org/support [R=301,L]
RewriteRule ^/fellowship/login.* https://my.fsfe.org/ [R=301,L]
RewriteRule ^fellowship/card https://wiki.fsfe.org/TechDocs/CardHowtos [R=301,L]
RewriteRule ^fellowship/communicate /contact/community.html [R=301,L]
RewriteRule ^fellowship/contact /contact/contact.html [R=301,L]
RewriteRule ^fellowship/events(.*) https://fsfe.org/events$1 [R=301,L]
RewriteRule ^fellowship/faq https://wiki.fsfe.org/KnowHow/FSFELife/FAQ [R=301,L]
RewriteRule ^fellowship/graphics/people - [L]
2019-11-11 14:19:58 +01:00
RewriteRule ^fellowship/groups/berlin https://wiki.fsfe.org/LocalGroups/Berlin [R=301,L]
RewriteRule ^fellowship/groups/coordinators https://wiki.fsfe.org/Teams/Coordinators [R=301,L]
RewriteRule ^fellowship/groups https://wiki.fsfe.org/LocalGroups [R=301,L]
RewriteRule ^fellowship/new-group https://wiki.fsfe.org/KnowHow/Groups/CoordinatorsHandbook [R=301,L]
RewriteRule ^fellowship/payment(.*) https://fsfe.org/donate/payment$1 [R=301,L]
RewriteRule ^projects/fellowship /fellowship/ [R=301,L]
2019-11-11 15:11:19 +01:00
# Catch the rest
RewriteRule ^fellowship / [R=301,L]
# Donate
2019-11-11 14:19:58 +01:00
RewriteRule ^donate.html$ /donate/donate.en.html [R=301,L]
RewriteRule ^donate(/?|/donate/?|/donate\..*|/index.*)$ https://my.fsfe.org/donate [R=301,L]
RewriteRule ^login https://my.fsfe.org/ [R=301,L]
# =============================================================================
# MISCELLANEOUS
# =============================================================================
# Block nasty freebie sites
# block iframes
Header append X-FRAME-OPTIONS "SAMEORIGIN"
# block based on certain referers
RewriteCond %{HTTP_REFERER} .*telegra.ph/Besplatnye-vozdushnye-shary-i-naklejki-02-19 [NC,OR]
RewriteCond %{HTTP_REFERER} .*zakupersi.com.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*pepper.pl.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*pl-pepper.digidip.net.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*dealdoktor.de.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*monetenfuchs.de.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*devswag.io.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*devrant.com/rants/.* [NC]
RewriteCond %{REQUEST_URI} ^/?promo.*$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/?contribute/spreadtheword[^-].*$ [NC]
2019-11-11 14:19:58 +01:00
RewriteRule .* /contribute/spreadtheword-freebie.html [L,R=302]