#.htaccess=== RewriteEngine on RewriteRule ^index\.html$ index.php [L] |
把.htaccess配置好,放到WEB根目录下,设置好了一条首页规则.然后用localhost/index.html访问网页时,出现了错误提示:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@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\logs\error.log里面去找相关错误的详细提示:
.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration |
LoadModule rewrite_module modules/mod_rewrite.so