forked from Moearly/YouBBS-EOEN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
robots.php
34 lines (27 loc) · 766 Bytes
/
robots.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
define('IN_SAESPOT', 1);
define('CURRENT_DIR', pathinfo(__FILE__, PATHINFO_DIRNAME));
include(CURRENT_DIR . '/config.php');
include(CURRENT_DIR . '/common.php');
header("content-Type: text/plain");
echo 'User-agent: *
Disallow: /login
Disallow: /newpost/
Disallow: /setting
Disallow: /notifications
Disallow: /sigin
Disallow: /wbsetname
Disallow: /qqsetname
Disallow: /admin
Disallow: /forgot
Disallow: /favorites
';
$table_status = $DBS->fetch_one_array("SHOW TABLE STATUS LIKE 'yunbbs_articles'");
$post_num = $table_status['Auto_increment'] -1;
$max_num = 39000;
$taltol_page = ceil($post_num/$max_num);
$base_url = 'http://'.$_SERVER['HTTP_HOST'];
for($i = 1; $i <= $post_num; $i+=$max_num){
echo 'Sitemap: ',$base_url,'/sitemap-',$i,"\n";
}
?>