My recent move from underscores to hyphens in filenames has caused me a couple of unexpected headaches, but it’s also taught me some interesting things about Apache’s mod_rewrite. I’ve been buried in .htaccess for hours lately, playing detective to strange behavior on my site. My most recent discovery involves the limitations of Apache’s implementation of regular expressions in mod_rewrite. I think the developers were trying to prevent wannabes like me from screwing up their own sites and consuming server resources, but it’s caused me some frustration.
(more…)
I’ve become a little too interested in SEO of late, and I learned that hyphens are preferred by Google to underscores. (By the way, many people erroneously label hyphens as dashes; they are two distinct things.)
It seems that Google actually indexes a URL containing sample_phrase as the text jumbled together, or samplephrase. Therefore, for a searcher to find these terms in the URL of your page, he would have to search for the exact text: “sample phrase”. However, with hyphenated URLs (sample-phase), Google properly parses out each individual word, allowing a user searching for sample or phrase to hit that page.
So, with that in mind, I decided to make some changes ’round here to page names. And create a lot of work for myself on a Sunday afternoon.
(more…)