Sitemap
* generate and link basic sitemap
This commit is contained in:
parent
5a230daad6
commit
0d645334cb
6 changed files with 272 additions and 2 deletions
|
|
@ -406,7 +406,7 @@ CLISetup::registerUtility(new class extends UtilityScript
|
|||
|
||||
$prot = Cfg::get('FORCE_SSL') ? 'https://' : 'http://';
|
||||
$cases = array(
|
||||
'site_host' => [$prot, Cfg::get('SITE_HOST'), '/robots.txt'],
|
||||
'site_host' => [$prot, Cfg::get('SITE_HOST'), '/index.php'],
|
||||
'static_host' => [$prot, Cfg::get('STATIC_HOST'), '/css/aowow.css']
|
||||
);
|
||||
|
||||
|
|
|
|||
24
setup/tools/filegen/robots.ss.php
Normal file
24
setup/tools/filegen/robots.ss.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace Aowow;
|
||||
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
if (!CLI)
|
||||
die('not in cli mode');
|
||||
|
||||
|
||||
CLISetup::registerSetup("build", new class extends SetupScript
|
||||
{
|
||||
use TrTemplateFile;
|
||||
|
||||
protected $info = array(
|
||||
'robots' => [[], CLISetup::ARGV_PARAM, 'Fills robots.txt with site variables.']
|
||||
);
|
||||
|
||||
protected $fileTemplateSrc = ['robots.txt.in'];
|
||||
protected $fileTemplateDest = ['robots.txt']; // aowow root
|
||||
});
|
||||
|
||||
?>
|
||||
28
setup/tools/filegen/templates/robots.txt.in
Normal file
28
setup/tools/filegen/templates/robots.txt.in
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
User-Agent: *
|
||||
Disallow: /?account
|
||||
Disallow: /account/
|
||||
Disallow: /?account=*
|
||||
Disallow: /?profile
|
||||
Disallow: /profile/
|
||||
Disallow: /?profile=*
|
||||
Disallow: /?profiles
|
||||
Disallow: /profiles/
|
||||
Disallow: /?profiles=*
|
||||
Disallow: /?guild
|
||||
Disallow: /guild/
|
||||
Disallow: /?guild=*
|
||||
Disallow: /?guilds
|
||||
Disallow: /guilds/
|
||||
Disallow: /?guilds=*
|
||||
Disallow: /?arena-team
|
||||
Disallow: /arena-team/
|
||||
Disallow: /?arena-team=*
|
||||
Disallow: /?arena-teams
|
||||
Disallow: /arena-teams/
|
||||
Disallow: /?arena-teams=*
|
||||
Disallow: /?random
|
||||
Disallow: /random/
|
||||
Disallow: /?search
|
||||
Disallow: /search/
|
||||
Disallow: /?search=*
|
||||
Sitemap: CFG_HOST_URL/?sitemap
|
||||
Loading…
Add table
Add a link
Reference in a new issue