summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-31 10:12:26 -0500
committerEvan Prodromou <evan@status.net>2010-01-31 10:12:26 -0500
commitdc62246443e3584ef5267505275f618f6fa86bf7 (patch)
tree850c1f89d9e1df589bfe3eed47ce3b790407dc2b /index.php
parentfec8066bf76948142828b689708386861d089fb3 (diff)
Add a robots.txt URL to the site root
Adds a robots.txt file to the site root. Defaults defined by 'robotstxt' section of config. New events StartRobotsTxt and EndRobotsTxt to let plugins add information. Probably not useful if path is not /, but won't hurt anything, either.
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/index.php b/index.php
index 605b380bf..06ff9900f 100644
--- a/index.php
+++ b/index.php
@@ -285,8 +285,9 @@ function main()
if (!$user && common_config('site', 'private')
&& !isLoginAction($action)
&& !preg_match('/rss$/', $action)
- && !preg_match('/^Api/', $action)
- ) {
+ && $action != 'robotstxt'
+ && !preg_match('/^Api/', $action)) {
+
// set returnto
$rargs =& common_copy_args($args);
unset($rargs['action']);