fixed /path/forwarding. uncomment, if you want to use it.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3398 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent e0decf4653
commit 42e9747650

@ -5,8 +5,8 @@
$page = 'error.html';
$peername = 'Error';
$seedurl = 'http://www.anomic.de/yacy/seed.txt'; // remote seed-file
$seedfile = 'seed.txt'; // local cache file, needs write access
$hostlength = 24; // EDIT THIS! length of the hostname + 1 (strlen(".peer.karlchenofhell.org"))
$seedfile = 'seed.txt'; // local cache file, needs write access
$hostlength = 24; // EDIT THIS! length of the hostname + 1 (strlen(".peer.karlchenofhell.org"))
function get($url, $filename) {
if(!file_exists($filename) || (time()-filectime($filename)) > 600){
@ -79,27 +79,27 @@
return $r;
}
###peername.yacypeer.dyndns.org
###rewrite:
###RewriteCond %{REQUEST_URI} /error.html
###RewriteRule ^/(.*) /error.html [L]
###RewriteRule ^/(.*) /index.php?url=$1 [L]
$name = $_SERVER['SERVER_NAME'];
$name = substr($name, 0, strlen($name) - $hostlength);
###domain.org/peername/*
###rewrite:
###RewriteRule ^/(.*) /error.html [L]
###RewriteRule ^/([^\/]*)/(.*) /index.php?name=$1&url=$2 [L]
#$name=$_GET['name'];
$seedfile = get($seedurl, $seedfile);
$peers = decodeSeedList($seedfile);
$peer = $peers[strtolower($name)];
#peername.yacypeer.dyndns.org
#rewrite:
#RewriteCond %{REQUEST_URI} /error.html
#RewriteRule ^/(.*) /error.html [L]
#RewriteRule ^/(.*) /index.php?url=$1 [L]
#$name=$_SERVER['SERVER_NAME'];
#$name=substr($name, 0, strlen($name)-(strlen($basehost)+1)); //+1 because we filter .$basehost
#domain.org/peername/*
#rewrite:
#RewriteRule ^/(.*) /error.html [L]
#RewriteRule ^/([^\/]*)/(.*) /index.php?name=$1&url=$2 [L]
if (strlen($name) == 0 || $peer == null) {
// peer-list
@ -142,5 +142,4 @@
</frameset>
</html>
<?
}
?>
}
Loading…
Cancel
Save