• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

htaccess

Link from Google Redirecting

March 28, 2016 by Webhead

After years of not having a client get hacked, I got 2 in a few weeks.  One client (client A) has a WordPress site which I developed the theme on.  Another client (client B) was brand new, no WordPress.  Client A’s site was redirecting to a porn site whenever a visitor went through a link from Google.  Client B’s site was redirecting to a 404 page (a php file was not found).  Both sites were fine when visiting the direct link.

I found malicious code in Client A’s .htaccess file redirecting anyone visiting from google, bing, or any of the major search engines.  I found and removed the PHP files that were not supposed to be on the site.

Client B’s site was clean as a whistle. Nothing suspicious in the htaccess file and no mysterious php files.  Needed to contact the host about this one.

In searching for more information on how the attackers may have gotten in, I came across this worrisome forum.  Both clients are on GoDaddy so this is probably the issue they both had:

https://wordpress.org/support/topic/malware-redirect-hacks-specific-question-regarding-vulnerabilities?replies=12

Filed Under: Coding, Server Stuff Tagged With: goDaddy, hacked, hosting, htaccess

htaccess Examples

April 23, 2014 by Webhead

Common .htaccess redirects are available on github:

https://gist.github.com/ScottPhillips/1721489

How nice.  I need this.

Filed Under: Server Stuff Tagged With: htaccess

WordPress htaccess Explained

August 14, 2013 by Webhead

A great post explaining each line of WordPress’ htaccess file.

 

http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/

Filed Under: Server Stuff Tagged With: htaccess, wordpress

jPlayer doesn’t play in IE9

December 12, 2012 by Webhead

Problem

Using jPlayer to play video works fine in Chrome and Firefox and the iPhone, but does not play in Internet Explorer 9 (IE9).  In IE9 it just shows a black screen and goes back to the first frame.

 

Solution

What seemed to fix the problem was defining  the mime types.  Simply add the following lines to your htaccess if you are trying to play mp4 files:

AddType video/mp4 mp4
AddType video/mp4 m4v

source: http://stackoverflow.com/questions/6175417/jplayer-issue-in-ie9
other help: http://www.jplayer.org/latest/developer-guide/#jPlayer-server-response
keywords: jplayer ie9 doesn’t play

Filed Under: Coding Tagged With: htaccess, html 5, IE crap

Page Speed SEO

April 4, 2012 by Webhead

One of the metrics for Search Engine Optimization is the time it takes to load a page.  With Google’s PageSpeed tool, you can see if your page is loading optimally.  One of the ways to better your page loading is by leveraging browser cache.  The article below explains it well.  What I did was a little simpler.  I basically just bypassed all the ExpiresByType and just put the ExpiresDefault in my .htaccess.


<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 2 week"
</IfModule>

keywords: leverage browser caching
source: http://thomasgriffinmedia.com/blog/2010/11/how-to-leverage-browser-caching-in-wordpress-via-htaccess/

Filed Under: Coding, Server Stuff Tagged With: apache, google, htaccess, seo

WordPress .htaccess Exclude folder from RewriteRule

December 8, 2011 by Webhead

To exclude a folder from the wordpress rewrite in .htaccess, add the following line before the other RewriteConds, replacing somedir with your folder name:

RewriteCond %{REQUEST_URI} !^/(somedir|somedir/.*)$

Filed Under: Server Stuff Tagged With: htaccess, wordpress

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php php 5.3 responsive rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools