If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I've spoken to the new host's tech support about this. They've confirmed that the htaccess file is working in other respects (and I've since confirmed this myself). They say it must be a programming problem, not a system problem.

They speculated that it's due to some difference in the way the rewrite module works between the version of Apache on my development system (2.2.17) and their version (2.2.22). That seems unlikely to me, but I don't know what else to suspect.

Here's the contents of the htaccess file:

Code:

RewriteEngine on
Options FollowSymLinks
#RewriteBase is not needed because we are not rewriting the directory name.
#This rule transforms "list-t-key" to "list.php?t=key".
RewriteRule ^list-(.*)-(.*)$ list.php?$1=$2

Any suggestions? If it's something weird in htaccess, how can I find it? If not, how might I prove that and force them to look farther?

This was a classic case of looking failing to solve a problem by approaching it logically when the cause was completely off the wall.

While trying to localize a bit of puzzling behavior that appeared to be only vaguely related to the problem, I ran across a PHP class method that was defined like this:

Code:

public public function name(arg,arg,arg) {
. . .
}

I fixed this, and everything started working.

Here's where I went wrong:

Wrong assumption #1: it works on the old site, so it must be correct.

The version of PHP running on the old site simply ignored this bug. So did the version on my development system and the syntax checker in my IDE. But that didn't make it any less fatal.

Wrong assumption #2: the symptom points to the problem.

The symptom was a 404 error that listed the un-rewritten URL as the page that was not found. This led me to assume that mod_rewrite wasn't working. In fact it was working perfectly, but when the script at the rewritten URL was loaded, it got a syntax error. I don't know how that caused a 404 error, and may never know.

The server's error log would have shown me exactly what was happening... if the symptom had given me any reason to look at it.

I can't say I learned anything new here, but I re-learned a very old lesson: when things don't work, question every assumption you made... particularly the ones you didn't know you made!