Cruft-free URLs with PHP
I ran into a bit of an issue while I was implementing Mark Pilgrim’s Cruft-free URLs in Movable Type on this site, in that I am lazy and all of my files generally have PHP includes instead of old-style Apache #include inline directives. In short, adding the directive DefaultType text/html to my .htaccess file in the root directory had some nasty side effects.
In short, suddenly every page with inline PHP commands was broken. The PHP was never being parsed because, yep, all files without an extension were defaulting to content type text/html. Not the best thing in the world.
To fix this, I changed the content type of the directive to reflect the use of PHP on my site, as follows.
It worked like a charm.
Comments on "Cruft-free URLs with PHP"
Leave a comment | Trackback | Comments feed (RSS 2.0)Sorry, there are not any comments on this entry yet. Would you like to leave a comment?