1

I've created a WordPress posting with an URL slug "favicon":

https://blog.zeta-producer.com/favicon/

Unfortunately this seems to somehow interfere with the favicon, because instead of showing the posting, I see an error message:

Not Found
The requested URL /favicon.ico/ was not found on this server.

Probably some URL rewriting gets in the way.

My question:

Are there any workarounds (beside renaming the slug) to show my posting under the "favicon" slug?

More information:

I do have a /favicon.ico file in-place. (no trailing slash, obviously)

My server is a Windows Server 2012 running Apache.

My full .htaccess file looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>    
# END WordPress

Update 1:

On a totally different WordPress installation, on a totally different web server, I get the same behaviour of not being able to have a posting URL slug called "favicon".

Update 2:

The error is gone, if I delete the physical file "favicon.ico" file in the root of my WordPress website.

My workaround is now to move the "favicon.ico" to another folder and specify it explicitely in the "head.php" of the theme like e.g.:

<link 
    rel="shortcut icon" 
    type="image/x-icon" 
    href="/wp-content/themes/twentyfifteen/favicon.ico">
5
  • 1
    Do you have access to the full Apache configuration? Do you have a folder called favicon in your document root?
    – kovshenin
    Commented Nov 15, 2016 at 12:24
  • @kovshenin Thanks. 1.) I do have access to Apache configuration. What should I look for? (The word "favcion" never occurs in there). 2.) No folder called "favicon".
    – Uwe Keim
    Commented Nov 15, 2016 at 12:33
  • 1
    Not entirely sure, anything related to rewrites I guess. The problem is definitely at the web server level because the request is not even hitting PHP. Also, if you request /readme/ you'll see the same for readme.html and /license/ for license.txt, as if it's trying to "guess". Posting your full Apache configuration may help.
    – kovshenin
    Commented Nov 15, 2016 at 12:43
  • 1
    Check if the Apache config has "Multiviews" enabled. If so, try disabling it. Or add "Options -Multiviews" to the top of the .htaccess file.
    – Otto
    Commented Nov 15, 2016 at 16:03
  • @Otto Awesome, that did the trick! Could you please post this as an answer so I can accept and upvote?
    – Uwe Keim
    Commented Nov 15, 2016 at 19:57

1 Answer 1

2

Check if the Apache config has "Multiviews" enabled. If so, try disabling it.

Or add "Options -Multiviews" to the top of the .htaccess file.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.