pat_ads Posted October 29, 2014 Share Posted October 29, 2014 Hi all, I have a subdirectory install of WHMCS (Wordpress front end) and I'm having an issue with a file constantly showing as a 404 error in my security logs, whenever someone views my WHMCS Knowledgebase. I opened a support ticket with staff, but their suggestion was too advanced for me. Here's a digest of my ticket: I have created some Knowledgebase articles and categories. As my clients browse these I am logging 404 errors. Below is the most recent. URI: /portal/knowledgebase/6/templates/mytemplate/wp-content/favicon1.ico I have checked and favicon1.ico exists in the template directory. I would appreciate any help. The favicon1.ico 404's are quite numerous and Better WP Security is locking some of these visitors out. Response: Looking at the 404 errors for favicon, it is trying to load at a location that does not actually exist (it is a rewrite). Your WP installation has many custom rewrites, and as htaccess is recursive, it is likely they are affecting your WHMCS installation. Please try disabling your Wordpress .htaccess and see if this issue still occurs, if not, you may want to include a RewriteBase command for your WHMCS installation .htaccess to help prevent this. Please let us know if there is anything else we can do to assist you. At first I thought they meant .htaccess in root, that file is too important with all the security stuff from Wordpress. However, but I now suspect they mean the .htaccess file in my WHMCS subdirectory. That subdirectory file exists and contains: RewriteEngine On # Announcements RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC] RewriteRule ^announcements$ ./announcements.php [L,NC] # Downloads RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^downloads$ ./downloads.php [L,NC] # Knowledgebase RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC] RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC] I would appreciate any tips on resolving this. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 30, 2014 Share Posted October 30, 2014 replace the URL for favicon with absolute URL (http://website.tld/path/to/favicon.ico) maybe 0 Quote Link to comment Share on other sites More sharing options...
pat_ads Posted October 30, 2014 Author Share Posted October 30, 2014 Tried to do that but the knowledge base link is not actually a physical URL. Thanks. Any other suggestions out there? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted October 30, 2014 Share Posted October 30, 2014 Tried to do that but the knowledge base link is not actually a physical URL. Thanks. Any other suggestions out there? i'm talking about URL of favicon in header.tpl, you need to change it from "templates/mytemplate/favicon1.ico" to "http://yourdomain.com/templates/mytemplates/favicon1.ico" 0 Quote Link to comment Share on other sites More sharing options...
pat_ads Posted October 30, 2014 Author Share Posted October 30, 2014 (edited) I think that did it! The only change was I left the 'http' off because I want the system to use either http or https, depending on where the client is on my website when he clicks the knowledgebase link. The original header.tpl file reference was: <link rel="shortcut icon" href="templates/{$template}/favicon.ico"/> Changed to: <link rel="shortcut icon" href="//mydomain.com/mywhmcsdir/templates/mytemplate/favicon.ico"/> Thanks! Edited October 30, 2014 by pat_ads 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.