Site address and settings

One installation is one site. Its address lives only in the configuration; its name, description and robots rules are edited in the admin.

The address

Two keys of the configuration set the address: site.domain — the host, with :port if the port is not standard — and site.root — the path, / by default. The installer writes them from --domain or --url (see Installation); no command changes them later, so to move a site to another address, edit the configuration. Nothing about the address is stored in the database.

Every link, letter and redirect uses this address; the Host header of a request is never used. The scheme, http or https, is the scheme of the request; the site never redirects to HTTPS itself — see Security.

  • A GET or HEAD request to another host or port gets one redirect (301) to the configured address.
  • A page address without the trailing slash gets a redirect (301) to the one with it: /about → /about/. Files — the last part of the path has a dot — and POST requests are not redirected.
  • The session cookie is set for .<host>, which covers subdomains; for an address with a port, an IP address or a name without a dot, such as localhost, it is set for the host only.

Static files: setup linker

php index.php setup linker links the theme, scripts, images and templates of the core and the site into web/images, web/scripts, web/stylesheets and web/templates. Run it after a static file is added, removed or renamed. It refuses to run as root and stops, without touching anything, if a module named in the configuration is missing.

Page addresses

A page's address is the chain of its parents' segments. A segment is lowercase Latin letters, digits, - and .; left empty, it is made from the page's name; it must be unique among the page's neighbours. The default language has no prefix, the others do: /ua/about/.

When a page is renamed or moved, its old address keeps answering with a redirect (301) to the new one. A page can also send visitors elsewhere: «Перенаправлять по адресу» (Redirect to address) in the page form answers with a temporary redirect (302) to that address.

Site settings

«Настройки сайта» (Site settings) — the page /admin/settings/ and the button on the admin toolbar — holds:

  • for each language: «Название сайта» (Site name), «Мета keywords» and «Мета описание» (Meta description); a page without its own keywords or description takes the site's;
  • for the whole site: «Мета robots» — NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET, NOODP;
  • «Дополнительные параметры» (Extra parameters): your own name and value pairs, readable in PHP as E()->getSiteManager()->getCurrentSite()-><name>.

The installed site is named «Energine Platform» in both languages. The name shows in the header and at the end of the page title.

robots.txt and the sitemaps

The site answers /robots.txt itself. With NOINDEX in the site's settings it closes the whole site (Disallow: /); otherwise it allows everything and names the XML sitemap. The XML sitemap is /google-sitemap/ and lists the pages a visitor can see, without the pages marked NOINDEX; the configuration keys seo.sitemapSegment and seo.sitemapTemplate set its address and template. The page /sitemap/ is the site map for people.

Do not put a static robots.txt into web/: it would replace the site's own, and php index.php setup check reports it as a failure.