Masking PHP via .htaccess
What we're doing: turning the .php extension into .whatever
Why we're doing this: security, seo, or because you want to (then you'll have to answer why for yourself)
How to do this:
In your .htaccess file, we're going to tell apache to parse your choice of a single or multiple .whatevers as php.
So if we wanted to parse .html files as php, we would do something like this:
AddType application/x-httpd-php .html
And if we wanted to parse .bunnyboyfoofoo files as .php:
AddType application/x-httpd-php .bunnyboyfoofoo
And if we wanted to parse .bunnyboyfoofoo, .html, .htm, .py, .kevinsmith, .google files through php:
AddType application/x-httpd-php .bunnyboyfoofoo .html .htm .py .kevinsmith .google
Simple and fun to play with if you're that type of person.
PS: Sorry it has been so long since my last update...it's summer, I've been enjoying it.
1 Comment »
RSS feed for comments on this post. TrackBack URL
[...] Masking PHP via .htaccess [...]