Tips for debugging .htaccess rewrite rules

后端 未结 16 3142
萌比男神i
萌比男神i 2020-11-21 05:17

Many posters have problems debugging their RewriteRule and RewriteCond statements within their .htaccess files. Most of these are using a shar

16条回答
  •  长发绾君心
    2020-11-21 05:56

    Make sure you use the percent sign in front of variables, not the dollar sign.

    It's %{HTTP_HOST}, not ${HTTP_HOST}. There will be nothing in the error_log, there will be no Internal Server Errors, your regexp is still correct, the rule will just not match. This is really hideous if you work with django / genshi templates a lot and have ${} for variable substitution in muscle memory.

提交回复
热议问题