.htaccess Tutorials

  • By
    Firefox OS Manifest .htaccess Handler

    Want to know one of the secrets why Firefox OS is so incredibly awesome?  If you've created your website correctly, i.e. using CSS media queries (responsive design) and JavaScript feature detection, you can simply add an app.manifest file at the root of your domain and...

  • By
    Block Domains & Subdomains Using .htaccess

    A large focus of my redesign was improving site speed, and in doing so, I took a look at my site's error_log for the first time in a long time.  I was shocked when I found out that 90% of my site errors were either hacking...

  • By
    Prevent Robot Indexing with Response Headers

    Every so often you have parts of your website that would be better off not indexed by search engines.  API calls, search result pages, PDF documents -- all examples of responses which may not have value outside of the current user.  No we all know we...

  • By
    IFRAME Permission Denied Solution

    I was recently rolling my own AJAX upload script, posting a form to a hidden IFRAME and using the load event to know when the upload was complete.  When the upload completed, I wanted to access the IFRAME content so I could verify that the upload...

  • By
    Adaptive Images

    The landscape of web continues to change as we get more and more devices that we need to support. One concern when creating websites that should accommodate all screen sizes is image size. The acceptable size for an image is not the same across...

  • By
    Android Detection with JavaScript or PHP

    I've noticed that two of my blog posts continue to get more popular each week:  iPad Detection with JavaScript or PHP and iPhone and iPad detection with JavaScript or PHP. What's obvious is that Android development is a hot topic that will only...

  • By
    Search Engine Friendly URLs with .htaccess and mod_rewrite

    I was recently developing a PHP website that used mod_rewrite to make its URLs search engine friendly. Websites have been using mod_rewrite and .htaccess strategies to do this for years now and there are a 100 ways to accomplish the task. One issue that...

  • By
    Fixing mod_rewrite and .htaccess on GoDaddy Hosting

    I recently launched a new website on GoDaddy shared hosting. The website required mod_rewrite for SEO-friendly URLs. GoDaddy provides mod_rewrite but every time I tried to hit a two-deep URL, I would get a 404 error. Here's what I had: The fix to this...

  • By
    Adding the XPI MIME Type for Firefox Extension Installs

    Yesterday I posted version 0.1 of the David Walsh Blog Toolbar for Firefox. Unfortunately that led to an awkward conversation with my .htaccess file. .htaccess: I have no idea what to do with this. me: I want the toolbar to install when they request this file. .htaccess...

  • By
    Improve Your YSlow Grade Using .htaccess

    A significant part of your YSlow grade depends on how well your site utilizes optimal caching techniques. By editing your .htaccess file, you can increase your YSlow score by 20 points or so in just 3 minutes! Quick Intro to Caching Caching is a browser feature...