From cf3fbdffff6d03336bcc931919d282677c8480f0 Mon Sep 17 00:00:00 2001 From: cflakes Date: Tue, 23 Mar 2010 23:26:38 +0000 Subject: [PATCH] Add a robots.txt file. Since WebMods now deliver (albeit basic) pages to visitors that have not logged into any ZNC account, we certainly want to protect peoples' ZNC's from Google's crawlers. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1843 726aef4b-f618-498e-8847-2d620e286838 --- WebModules.cpp | 2 ++ webskins/_default_/pub/robots.txt | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 webskins/_default_/pub/robots.txt diff --git a/WebModules.cpp b/WebModules.cpp index 5c9d5fdc..91183736 100644 --- a/WebModules.cpp +++ b/WebModules.cpp @@ -535,6 +535,8 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS return PrintTemplate("index", sPageRet); } else if (sURI == "/favicon.ico") { return PrintStaticFile("/pub/favicon.ico", sPageRet); + } else if (sURI == "/robots.txt") { + return PrintStaticFile("/pub/robots.txt", sPageRet); } else if (sURI == "/logout") { m_spSession->SetLoggedIn(false); SetLoggedIn(false); diff --git a/webskins/_default_/pub/robots.txt b/webskins/_default_/pub/robots.txt new file mode 100644 index 00000000..1f53798b --- /dev/null +++ b/webskins/_default_/pub/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /