darrenbarefoot.com

WebHead Help

I’m not looking for Spiderman. Unless he’s got an IT diploma. We’re 99% (I say we and I really mean Ray) implementing a redesign of my site, but we’ve been pipped at the post by some .htaccess tomfoolery. Ray has articulated the particular problem on his site, so if you’re inclined to Apache and generosity, take a look.

6 Responses to “WebHead Help”

  1. Jason Says:

    The links in your post are broken.

  2. Darren Says:

    I hate to be that guy, but they work for me. The link is: http://www.vanderwoning.ca/archives/2004/12/21/476.html.

  3. John Keyes Says:

    Your installation of Apache should have mod_rewrite installed. If so it should as straightforward as adding the following to the .htaccess file:

    RewriteEngine On
    RewriteRule ^index.html index.php

  4. Rog Says:

    Just the AddType has always worked for me ( AddType application/x-httpd-php .html ).

    It sounds as though there’s a conflicting directive, perhaps gzip compression on html that isn’t PHP aware or something? I’m just guessing, would be impossible to know without seeing the complete conf files.

    I wouldn’t use the mod_rewrite hack for it (would that even work instead of AddType, I don’t think it would execute the PHP code), you’d want all .html to be able to include PHP.

  5. John Keyes Says:

    mod_rewrite does work for this, if you want a general rule to support XXX.html -> XXX.php simply use the following rule:

    RewriteRule ^(.*).html $1.php

  6. Rog Says:

    Ugh, now I really have to say something. mod_rewrite has significant overhead, it’s a bad bad idea to rewrite every URL on a site with a fair amount of traffic. It’s intended for the occasional quick fix, not a workaround like this. It would be far better to fix the problem the Right Way ™.

Post a Comment

PREV: Bloggish Notes
NEXT: Clicking on Ads

This is darrenbarefoot.com, weblog of Darren Barefoot. You are viewing WebHead Help.

Do you want to drive more visitors to your website?

Increase your company's visibility online?

Understand the world of blogs, Facebook and social media?

Then check out my Social Media Marketing eBook:


 Categories