Sunnuvabitch. I've been working for so long on my test server, that I didn't realize something very important about my stupid host. A lot of functionality for my web site depends on mod_rewrite. I was going to upload what I have done so far, in order to post it here and have everybody try and break it, to see if anybody could find any bugs, and guess what?? My damned production server doesn't have mod_rewrite!
So I call them to ask them if they can turn it on, and I get some dumb ass working tech support who doesn't know a thing about tech support telling me that they can't turn it on because it could cause problems with other people on the server. After explaining to him three times that it can't possibly hurt anybody, as turning it on doesn't disable any functionality, it only adds functionality, and there's no inherent security risks involve, AND that it's part of apache already, the whole thing would take about four seconds of effort, he promised to "prioritize" my request to the engineering department. That was also after I asked him to talk to somebody who could actually help me, four or five times.
NetworkSolutions is crap. For a company that's been around a long time on the web, you'd think they would have something to offer, but noooo, if anything they've turned into an unethical pile of dog turd. (I mention unethical due to their practice of front running domains, and I'm sure other shizzle too).
Anywho, just had to bitch, I'm going to go and start shopping for a decent host now. Any suggestions? I don't need a dedicated server yet, I just want a simple, affordable host with PHP 5, MySQL 5, and mod_rewrite.
I faced a hair-tearing problem. mod_rewrite was loaded and yet it was not working in .htaccess files (and httpd.conf initially). Here is the solution along with how you can debug mod_rewrite problems.
Add these two line to your httpd.conf immediately after RewriteEngine On.
After that I added the required RewriteRule etc.
The reason for testing directly in httpd.conf is to ensure that mod_rewrite is working in the first place. After some debugging I realized my expression was wrong. So now I found mod_rewrite was working in httpd.conf. However it still wasn't working in .htaccess files.
I found AllowOverride was set to None in httpd.conf. I changed it to All (after all I am the only user of the machine). And it finally started working everywhere (after a restart).
What I learnt:
Unmanaged dedicated web hosting is really really painful, unless you are (or have) a good linux system administrator. Too many things to setup and too many points of failure. And I haven't even started working on serious hardening stuff.