summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-04-11 21:21:58 +0200
committerThomas Lange <code@nerdmind.de>2017-04-11 21:21:58 +0200
commitb66d953dd1f757b43b93aafe115bf838e386811b (patch)
treed50eceee5b51af6af263ab3be8f19c68243b5f5d
parentfaee5e27d42e5db16a11cb78722bd4d033ca26d8 (diff)
downloadblog-b66d953dd1f757b43b93aafe115bf838e386811b.tar.gz
blog-b66d953dd1f757b43b93aafe115bf838e386811b.tar.xz
blog-b66d953dd1f757b43b93aafe115bf838e386811b.zip
All requests to "favicon.ico" will now be redirected to the current template directory "rsrc/favicon.ico" (if the "favicon.ico" inside the root directory does not exist).
-rw-r--r--index.php5
-rw-r--r--template/standard/html/main.php2
2 files changed, 6 insertions, 1 deletions
diff --git a/index.php b/index.php
index 37dcce8..a96d423 100644
--- a/index.php
+++ b/index.php
@@ -83,6 +83,11 @@ Router::addRedirect('feed/(page|post)', Application::getURL('feed/$1/'));
Router::addRedirect('search', Application::getURL('search/'));
#===============================================================================
+# REDIRECT: Favicon
+#===============================================================================
+Router::addRedirect('favicon.ico', Application::getTemplateURL('rsrc/favicon.ico'));
+
+#===============================================================================
# Execute router and route requests
#===============================================================================
Router::execute(parse_url(HTTP::requestURI(), PHP_URL_PATH));
diff --git a/template/standard/html/main.php b/template/standard/html/main.php
index c6cfa7d..ac9bf31 100644
--- a/template/standard/html/main.php
+++ b/template/standard/html/main.php
@@ -40,7 +40,7 @@ $BLOGMETA_DESC = escapeHTML($BLOGMETA['DESC']);
<?php endforeach; ?>
<?php endif; ?>
- <link rel="icon" href="<?=Application::getURL('favicon.ico')?>" />
+ <link rel="icon" href="<?=Application::getTemplateURL('rsrc/favicon.ico')?>" />
<link rel="stylesheet" href="<?=Application::getTemplateURL('rsrc/main.css')?>" />
<link rel="alternate" type="application/rss+xml" title="<?=$Language->text('feed_name_items', $BLOGMETA_NAME)?>" href="<?=Application::getURL('feed/')?>" />