Clue Bin

Clues for the Clueless

Archive for the ‘Apache’ Category

Parsing PHP in .html Files —

Is parsing PHP in web pages that end in .html or .htm, possible? Absolutely! If you’re hosted on an Apache webserver, just edit the .htaccess file in your documentroot. RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html Apache is now parsing PHP in .html for that website.

Wildcard RedirectMatch Examples for 301 URL Changes —

RedirectMatch 301 /places/international_and_uk_places/(.*) http://example.com/places/uk/$1 RedirectMatch 301 /places/international_and_uk_places.html http://example.com/places/uk.html It was decided that the ridiculously long category name “international_and_uk_places” needed to be renamed to ‘uk’ for a much shorter URL slug. The process would change a few hundred urls within that category, and they were all highly indexed in Google. Rather than waiting for Google to [...]