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
    Being a Dev Dad

    I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...

  • By
    Regular Expressions for the Rest of Us

    Sooner or later you'll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In...

Incredible Demos

Discussion

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