savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] mirror redirection


From: Brian Gough
Subject: [Savannah-hackers-public] mirror redirection
Date: Fri, 20 Aug 2010 09:10:35 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

Hi

This is my proposed change to redirect download links for files only,
and serve directory listings locally (this was to avoid unwanted ads
in directory listings on mirror sites.) I plan to put it online at the
weekend.

Brian Gough


*** /etc/apache2/sites-available/download       Fri May  7 07:04:18 2010
--- /etc/apache2/sites-available/download.no_redirect_dirs Fri Aug 20 07:54:59 
2010
***************
*** 68,74 ****
    Alias /mirmon/icons/ "/usr/share/mirmon/icons/"
    ScriptAlias /awstats.pl /var/www/download/awstats.pl
  
! <Location /releases>
     SetHandler perl-script
     PerlSetVar GeoIPDBFile "/usr/local/share/GeoIP/GeoIP.dat"
     PerlSetVar GeoIPMirror "/usr/local/share/GeoIP/download.txt"
--- 68,81 ----
    Alias /mirmon/icons/ "/usr/share/mirmon/icons/"
    ScriptAlias /awstats.pl /var/www/download/awstats.pl
  
! # Send requests for files to the Apache2::Geo::Mirror redirector
! RewriteEngine On
! RewriteRule ^/releases/(.*[^/])$ /releases-redirect/$1 [NS,PT]
! 
! # Serve everything else locally (i.e. directory listings) 
! Alias /releases/ "/srv/download/"
! 
! <Location /releases-redirect>
     SetHandler perl-script
     PerlSetVar GeoIPDBFile "/usr/local/share/GeoIP/GeoIP.dat"
     PerlSetVar GeoIPMirror "/usr/local/share/GeoIP/download.txt"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]