Beware the power of .htaccess
Published 3 years, 8 months ago in design + devOk, this is an egg on my face story:
On Janaury 9th, I wrote about adding Jeremy’s comment spam prevention code to my site. I also added the code to my .htaccess file. All has been well. I’ve gotten dramatically less spam since then… however…
I logged into my Google Adsense account the other day, and noticed that my earnings were way down… waaaay down. And that got me concerned. At first I suspected Google did a Google Dance on their servers, and that was sending a lot less traffic to me… but I figured if that had happened, a lot of other people would be complaining too, and I hadn’t noticed that… so…
I started looking at when the traffic dropped off, and I realized it apparently happened on January 10th. So, I read what I wrote on the 9th and/or 10th, and realized that I probably broke my site when I played with my .htaccess file, as it was all working fine before I played with that file.
Sure enough, none of the links on my site were working. See, I’ve got “extension free urls” which is a trick I pulled off, so that you can look at this url:
http://www.inluminent.com/weblog/archives/2005/01/09/comment_spam_prevention/
instead of this url:
http://www.inluminent.com/weblog/archives/2005/01/09/comment_spam_prevention.php
Not a huge deal, but enough that I like having “extension free urls”. Well, none of those links were working… but the real url (with the .php) was working fine, so I knew it wasn’t my entire site that was broken…
Anyways, I started investigating the .htaccess files for this site, and I had like 4 or 5 saved versions (I always save a copy, just in case I break something)… but none of them were from Janaury 9th. (I save files with this filename format filename.save.20050109 so that I know when they were saved from.)
I figured that maybe I didn’t save a copy, so I started playing with the .htaccess file powering the site, deleting stuff, and moving stuff around, and nothing was working. So I changed the owner to my useraccount and to root, and chmod’d it to 777, 755, 555, 677, 766, all manner of different combinations…
All to no avail.
Then I thought maybe I created a new .htaccess file in the /weblog directory for some reason, in addition to the one that sits at the root directory for this site.
Sure enough, that’s what I did. And the two files weren’t playing nice to each other, for whatver reason.
I deleted the extra file, and viola, all is well again.
Like I said, beware the power of .htaccess when you don’t really understand how mod_rewrite works, or rather, beware my own idiocy.
So, here’s to getting the Google traffic back to my archive pages, which is obviously where 90% of my Google revenues come from.
2 Responses to “Beware the power of .htaccess”
Leave a Reply
Search
Subscribe
Archives
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
- July 2003
- June 2003
- May 2003
- April 2003
- March 2003
- February 2003
- January 2003
- December 2002
- November 2002
- October 2002
- September 2002
- August 2002
- May 2002
Categories
- asides (445)
- baby (6)
- design + dev (142)
- for sale (7)
- get a job (11)
- investing (6)
- leadership + management (146)
- life stories (251)
- macintosh (320)
- marketing + advertising (223)
- Moveable Type (52)
- organization (6)
- photography + video (68)
- publishing + content (136)
- random (239)
- Saab (1)
- sales and selling (94)
- small business (147)
- stuff (68)
- sysadmin (40)
- travel (42)
- Video (2)
- windows (69)
- WordPress (13)

testing the comment system… please ignore
and here’s another test… this one in WP.