April Fools! Change Your PHP Pages to ASP…Or Not

By  on  

I don't know a lot of PHP developers that think very much of ASP. This, of course, sets the stage for a great April fools trick: we're going to change all of the links on our website from ".php" to ".asp" and see how many coworkers we can confuse the hell out of. Granted, most developers with a just few years of experience would figure out the method within a few minutes, but you can probably get the noob with this one.

Step One - Change the Links

<!-- FROM -->
<a href="/some-page.php">Click here</a>

<!-- TO -->
<a href="/some-page.asp">Click here</a>

Step Two - The .htaccess Code

AddType application/x-httpd-php .asp

Have fun and trick some people today!

Recent Features

  • By
    Responsive Images: The Ultimate Guide

    Chances are that any Web designers using our Ghostlab browser testing app, which allows seamless testing across all devices simultaneously, will have worked with responsive design in some shape or form. And as today's websites and devices become ever more varied, a plethora of responsive images...

  • By
    How to Create a Twitter Card

    One of my favorite social APIs was the Open Graph API adopted by Facebook.  Adding just a few META tags to each page allowed links to my article to be styled and presented the way I wanted them to, giving me a bit of control...

Incredible Demos

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!