Mercurial > SimpleWebPresenter
comparison Sitemap.inc @ 122:74c22a8dd38f
Support for both http and https for Sitemap
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Thu, 28 Dec 2017 18:49:07 +0100 |
| parents | e3f97bbf12f3 |
| children | 6766250a0baa |
comparison
equal
deleted
inserted
replaced
| 121:e3f97bbf12f3 | 122:74c22a8dd38f |
|---|---|
| 122 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 122 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 123 xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 | 123 xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 |
| 124 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> | 124 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> |
| 125 '; | 125 '; |
| 126 | 126 |
| 127 $base = 'http://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; | 127 $base = $_SERVER["REQUEST_SCHEME"] ."://". $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; |
| 128 $l = strrpos($base, '/'); | 128 $l = strrpos($base, '/'); |
| 129 if ($l) | 129 if ($l) |
| 130 $base = substr($base, 0, $l); | 130 $base = substr($base, 0, $l); |
| 131 | 131 |
| 132 $acceptedLanguages = $this->options->getAcceptedLanguages(); | 132 $acceptedLanguages = $this->options->getAcceptedLanguages(); |
