Sorry to burst your bubble but it’s not tricky at all. Your code has problems (besides not using the [noparse]
...
[/noparse] wrapper) …
# MISSING
RewriteEngine on
# matches xyhtml, i.e., the dot character needs to be escaped to match ONLY the dot character
# ^/? is only required if you don't know whether your on an Apache 1 or Apache 2 server.
# IMHO, find out and either use ^/ for Apache 1.x or ^ for Apache 2.x
# Since I don't believe there are any Apache 1.x servers out there any more ...
RewriteRule ^(.*)\\.html$ list.php?pg=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\\.php -f
RewriteRule ^(.*)$ $1.php [L]
# PLEASE learn to use mod_rewrite's flags
Sorry, the English got so twisted there that I’m not sure what you’re asking. It seems to be that you only want list.html to be redirected to the php script, not other .html pages. If that’s the case, WHY did you use the dreaded :kaioken: EVERYTHING (or NOTHING) atom :kaioken: to specify … well, EVERYTHING (or NOTHING) instead of … what?
Please note that, if you change the order of the RewriteRule (block) statements and the .html file(s) do not exist, they’ll be redirected to index.php and NEVER to list.php.