RewriteEngine On

# reject annoying porn.com referrers
RewriteCond %{HTTP_REFERER} ^http://www.porn.com.*
RewriteRule (.*) - [F]

#RewriteCond %{REQUEST_URI} ^/pub/fedora/linux/.*[/]+ia64.* [OR]
#RewriteCond %{REQUEST_URI} ^/pub/fedora/linux/.*[/]+sparc.*
#RewriteRule ^/pub/fedora/linux/(.*) /pub/fedora-secondary/$1

RewriteRule ^/pub/epel/7Server/(.+) http://localhost:10002/mirrorlist?path=pub/epel/7/$1&redirect=1 [P,QSA,L]
RewriteRule ^/(.+) {{proxyurl}}/mirrorlist?path=$1&redirect=1 [P,QSA,L]
RewriteRule ^/$ {{proxyurl}}/mirrorlist?path=pub/fedora/linux/&redirect=1 [P,QSA,L]

ProxyPassReverse / {{proxyurl}}/
