mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
parent
1ba2786f8b
commit
b32f366b01
2 changed files with 38 additions and 0 deletions
|
@ -83,4 +83,38 @@ final class AboutPresenter extends OpenVKPresenter
|
||||||
{
|
{
|
||||||
$this->template->languages = getLanguages();
|
$this->template->languages = getLanguages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderRobotsTxt(): void
|
||||||
|
{
|
||||||
|
$data = "# robots.txt file for openvk\n"
|
||||||
|
. "#\n"
|
||||||
|
. "# this includes only those links that are not in any way\n"
|
||||||
|
. "# covered from unauthorized persons (for example, due to\n"
|
||||||
|
. "# lack of rights to access the admin panel)\n\n"
|
||||||
|
. "User-Agent: *\n"
|
||||||
|
. "Disallow: /rpc\n"
|
||||||
|
. "Disallow: /language\n"
|
||||||
|
. "Disallow: /badbrowser.php\n"
|
||||||
|
. "Disallow: /logout\n"
|
||||||
|
. "Disallow: /away.php\n"
|
||||||
|
. "Disallow: /im?\n"
|
||||||
|
. "Disallow: *query=\n"
|
||||||
|
. "Disallow: *?lg=\n"
|
||||||
|
. "Disallow: *hash=\n"
|
||||||
|
. "Disallow: *?jReturnTo=\n"
|
||||||
|
. "Disallow: /wall*\n"
|
||||||
|
. "Disallow: /method/*\n"
|
||||||
|
. "Disallow: /token*";
|
||||||
|
header("Content-Type: text/plain");
|
||||||
|
exit($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderHumansTxt(): void
|
||||||
|
{
|
||||||
|
// :D
|
||||||
|
|
||||||
|
header("HTTP/1.1 302 Found");
|
||||||
|
header("Location: https://github.com/openvk/openvk#readme");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,6 +265,10 @@ routes:
|
||||||
handler: "About->sandbox"
|
handler: "About->sandbox"
|
||||||
- url: "/internal/wall{num}"
|
- url: "/internal/wall{num}"
|
||||||
handler: "Wall->wallEmbedded"
|
handler: "Wall->wallEmbedded"
|
||||||
|
- url: "/robots.txt"
|
||||||
|
handler: "About->robotsTxt"
|
||||||
|
- url: "/humans.txt"
|
||||||
|
handler: "About->humansTxt"
|
||||||
- url: "/{?shortCode}"
|
- url: "/{?shortCode}"
|
||||||
handler: "UnknownTextRouteStrategy->delegate"
|
handler: "UnknownTextRouteStrategy->delegate"
|
||||||
placeholders:
|
placeholders:
|
||||||
|
|
Loading…
Reference in a new issue