This is the contents of my .htaccess file:
Options +FollowSymLinks RewriteEngine on RewriteRule ^([^/]+)(?:/([^/]+))?$ /ssi/foo.php?a=$1&b=$2 [NE,L]
RewriteRule causes this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.22 (Ubuntu) Server at [domain name] Port 80
All my other
RewriteRules (which I've removed from the .htaccess file, to narrow down the problem) work, though.
RewriteRule slightly does not cause errors:
RewriteRule ^([^/]+)(?:/(a+))?$ /ssi/foo.php?a=$1&b=$2 [NE,L]
I also tried
RewriteRule ^([^/]+)(?:/(.+))?$ /ssi/foo.php?a=$1&b=$2 [NE,L]
but that results in the same error.
The above has now worked as it should after a server restart. It seems as there is nothing wrong with that
I guess it has turned out that my real question is: How can such things happen? Should I just accept that sometimes things mess up and a server restart likely solves the problem?