RewriteEngine On

# TODO: Are these still necessary?
RewriteRule ^/CodecBuddy http://fedoraproject.org/wiki/CodecBuddy [NC]
RewriteRule ^/soc.*$ http://fedoraproject.org/wiki/SummerOfCode [R=301,L]

# Legal redirects
RewriteRule ^/([^/]+/)?legal/licenses/export https://fedoraproject.org/wiki/Legal:Export [R=301,L]
RewriteRule ^/([^/]+/)?legal/licenses https://fedoraproject.org/wiki/Legal:Licenses/LicenseAgreement [R=301,L]
RewriteRule ^/([^/]+/)?legal/trademarks http://fedoraproject.org/wiki/Legal:Trademark_guidelines [R=301,L]
RewriteRule ^/([^/]+/)?legal https://fedoraproject.org/wiki/Legal:Main [R=301,L]

# Comment this when there is a prerelease available
RewriteRule  ^(/.*)?/get-prerelease.*$ http://fedoramagazine.org/fedora-22-beta-released/ [R=301,L]
#RewriteRule  ^(/.*)?/get-spin-prerelease.*$ $1/get-fedora [R=302]

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^/([^/]+/)?(keys|verify)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


RewriteCond %{HTTP_REFERER} .*fedorproject.*
RewriteRule .* http://mmcgrath.fedorapeople.org/spam.html [R=301,L]
