captive-1.0
[www.jankratochvil.net.git] / project / captive / Index.html.pl
index a9b19ae..e38751d 100755 (executable)
@@ -31,6 +31,25 @@ Wuse 'My::Project';
 Wuse 'project::captive::ListItem';
 
 
+# Redirect foreign visitors to our root with that disgusting introduction ad.
+{
+       my $r=Apache->request();
+       if (my $referer=$r->header_in("Referer")) {
+               Wuse 'WebConfig';
+               require URI;
+               my $refuri=URI->new_abs($referer,$r->uri());
+               if (1
+                               && $refuri->host() ne "localhost"
+                               && $refuri->host() ne &{$WebConfig::WebConfig{"web_hostname_sub"}}) {
+                       use Apache::Constants qw(REDIRECT);
+                       $r->status(REDIRECT);
+                       $r->header_out("Location"=>"http://".&{$WebConfig::WebConfig{"web_hostname_sub"}}());
+                       exit 0;
+                       }
+               }
+       }
+
+
 my $W=My::Project->init_project(
                "__PACKAGE__"=>__PACKAGE__,
                "ListItem"=>\@project::captive::ListItem::ListItem,
@@ -96,7 +115,7 @@ my %reqpkg=(
                23=>[qw(glib2 gnome-vfs2 ORBit2 libxml2 openssl popt readline)],
                );
 my %version=(
-               map(($_=>["0.9.7","0"]),qw(captive captive-lufs captive-install)),
+               map(($_=>["1.0","0"]),qw(captive captive-lufs captive-install)),
                "lufs"=>["0.9.6","1captive6"],
                "gnome-vfs-httpcaptive"=>["2.3.8captive2","0"],
                "ntfsprogs"=>["200309071734","1captive1"],
@@ -386,7 +405,7 @@ print <<"HERE";
                <li>@{[ a_href 'doc/Related.html.pl#vmware','Related Projects - VMware Workstation' ]}</li>
                <li>@{[ a_href 'doc/LinuxNTFS.html.pl',"Re: 7.7 Can't we write a wrapper for Windows' driver?" ]}</li>
                </ul></li>
-       <li>@{[ a_href 'http://cvs.jankratochvil.net/viewcvs/*checkout*/priv/captive/TODO?rev=HEAD','Known Bugs' ]}</li>
+       <li>@{[ a_href 'http://cvs.jankratochvil.net/viewcvs/*checkout*/captive/TODO?rev=HEAD','Known Bugs' ]}</li>
        <li>Man Pages<ul>
                @{[
                        do {