- fix for last commit

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3424 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent 88245e44d8
commit 93e1ad2bca

@ -32,12 +32,12 @@ public class robots {
if (rbc.isLockedDisallowed() || rbc.isDirsDisallowed()) { if (rbc.isLockedDisallowed() || rbc.isDirsDisallowed()) {
final ArrayList[] p = getFiles(env.getConfig(plasmaSwitchboard.HTROOT_PATH, plasmaSwitchboard.HTROOT_PATH_DEFAULT)); final ArrayList[] p = getFiles(env.getConfig(plasmaSwitchboard.HTROOT_PATH, plasmaSwitchboard.HTROOT_PATH_DEFAULT));
if (rbc.isLockedDisallowed()) { if (rbc.isLockedDisallowed()) {
prop.put(httpdRobotsTxtConfig.LOCKED, p[0].size()); prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.LOCKED, p[0].size());
for (int i=0; i<p[0].size(); i++) for (int i=0; i<p[0].size(); i++)
prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.LOCKED + "_" + i + "_page", p[0].get(i)); prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.LOCKED + "_" + i + "_page", p[0].get(i));
} }
if (rbc.isDirsDisallowed()) { if (rbc.isDirsDisallowed()) {
prop.put(httpdRobotsTxtConfig.DIRS, p[1].size()); prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.DIRS, p[1].size());
for (int i=0; i<p[1].size(); i++) for (int i=0; i<p[1].size(); i++)
prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.DIRS + "_" + i + "_dir", p[1].get(i)); prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.DIRS + "_" + i + "_dir", p[1].get(i));
} }
@ -58,12 +58,12 @@ public class robots {
if (htroots[i].equals("www")) continue; if (htroots[i].equals("www")) continue;
file = new File(htroot, htroots[i]); file = new File(htroot, htroots[i]);
if (file.isDirectory()) { if (file.isDirectory()) {
htrootDirs.add("/" + file.getName()); htrootDirs.add(htroots[i]);
} else if ( } else if (
(dot = htroots[i].lastIndexOf('.')) < 2 || (dot = htroots[i].lastIndexOf('.')) < 2 ||
htroots[i].charAt(dot - 2) == '_' && htroots[i].charAt(dot - 1) == 'p' htroots[i].charAt(dot - 2) == '_' && htroots[i].charAt(dot - 1) == 'p'
) { ) {
htrootFiles.add("/" + file.getName()); htrootFiles.add(htroots[i]);
} }
} }
return new ArrayList[] { htrootFiles, htrootDirs }; return new ArrayList[] { htrootFiles, htrootDirs };

@ -4,13 +4,16 @@ User-agent: *
#(all)# #(all)#
#{dirs}#
# dirs # dirs
Disallow: /#[dir]##{/dirs}# #{dirs}#
Disallow: /#[dir]#
#{/dirs}#
#{locked}#
# locked # locked
Disallow: /#[page]##{/locked}# #{locked}#
Disallow: /#[page]#
#{/locked}#
#(wiki)#:: #(wiki)#::
# wiki # wiki

Loading…
Cancel
Save