Monthly Archives: June 2012

Increase PHP’s File Upload Settings with .htaccess

From time to time the need comes up to increase the maximum file upload size for a website. For reference, what I’m referring to is uploading media files (pictures, PDFs, data files, etc.) through an HTML web form.

Typically PHP comes configured to allow a 2 Meg upload size. Some web hosting companies allow you to make these changes directly in the PHP.ini file. In that case you open your PHP.ini file and simply look for “upload_max_filesize”, “post_max_size”, and “memory_limit” and make the appropriate changes.

If no PHP.ini file is available through your hosting platform an alternative method for adjusting this would be to add the following three lines to your .htaccess file.

php_value  upload_max_filesize  8M
php_value  post_max_size  16M
php_value  memory_limit  24M 

Some notes:

Keep in mind that extra large files will take longer to upload so you’ll want to make sure that your scripts do not time out when uploading. This will be a trial-and-error process based most likely on your client’s Internet connection speeds.

SEO Audit Outline

[quotes_right]
REFERENCE: 

How to Perform the World’s Greatest SEO Audit by Steve Webb, Ph.D.

… Thanks, Steve, for the good reference.
[/quotes_right]

This article was posted on SEOMoz recently and I thought that it would make a great resource to have on-hand for reference when reviewing a website for SEO quality. The article is written by Steve Webb (see article references on this page) and I have captured the outline here for my reference. Visit the article for all of the full details.

SEO Audit Preparation

  • Crawl Before You Walk
  • Crawling Tools
  • Crawling Configuration
  • Ask the Oracles

SEO Audit Analysis

  • Accessibility
    • Robots.txt
    • Robots Meta Tags
    • HTTP Status Codes
    • XML Sitemap
    • Site Architecture
    • Flash and JavaScript Navigation
    • Site Performance
  • Indexability
    • Site: Command
    • Index Sanity Checks
    • Page Searches
    • Brand Searches
    • Search Engine Penalties
    • Make Sure You’ve Actually Been Penalized
    • Identify the Reason(s) for the Penalty
    • Fix the Site’s Penalized Behavior
    • Request Reconsideration
  • On-Page Ranking Factors
    • URLs
    • URL-based Duplicate Content
    • Content
    • Information Architecture
    • Keyword Cannibalism
    • Duplicate Content
    • HTML Markup
    • Titles
    • Meta Descriptions
    • Other <head> Tags
    • Images
    • Outlinks
    • Other <body> Tags
  • Off-Page Ranking Factors
    • Popularity
    • Trustworthiness
    • Backlink Profile
    • Authority
    • Social Engagement
    • Competitive Analysis

SEO Audit Report

  • Write for multiple audiences
  • Prioritize, prioritize, and then prioritize some more
  • Provide actionable suggestions


URL Trailing Slashes and Canonical URLs

I noticed recently in my Google Webmaster Tools account that Google seems to be honing in on house cleaning for webmasters. Maybe it’s the recent Google updates that have come down the pike in the past twelve months and maybe it’s just my imagination but nonetheless it’s a good habit for webmasters to practice.

The one thing that lead my suspicion of this was the notes on a few of my sites that Google has begun to put into “HTML Improvements area is alerts over trailing slashes in the URL string. For reference, the following URLs are not the same to a search engine:

  1. http://www.mysite.com/page-name
  2. http://www.mysite.com/page-name/
  3. http://www.mysite.com/page-name/index.html

Because I generally don’t link to any index.html files directly inside of directories, the first two in the list were of particular concern to me and not the third.

The solution is to put the following three lines into your .htaccess file:

RewriteCond %{REQUEST_URI} !\.[^./]+$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://www.mysite.com/$1/ [R=301,L]

That will automatically enter the trailing slash to the url if it is not already present. Remember to keep those three lines together in the .htaccess file.