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
    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...

  • By
    9 Mind-Blowing Canvas Demos

    The <canvas> element has been a revelation for the visual experts among our ranks.  Canvas provides the means for incredible and efficient animations with the added bonus of no Flash; these developers can flash their awesome JavaScript skills instead.  Here are nine unbelievable canvas demos that...

Incredible Demos

Discussion

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