.htaccess HTACCESS mod rewrite和子目录

.htaccess HTACCESS mod rewrite和子目录,.htaccess,.htaccess,我试图理解为什么它会给我一个内部服务器错误: RewriteEngine on rewritecond %{http_host} ^website.ca [NC] rewriterule ^(.*)$ http://www.website.ca/$1 [R=301,nc] RewriteRule ^/$ index.php RewriteRule ^realisations.html$ realisations.php RewriteRule ^couvreur-toiture/service

我试图理解为什么它会给我一个内部服务器错误:

RewriteEngine on
rewritecond %{http_host} ^website.ca [NC]
rewriterule ^(.*)$ http://www.website.ca/$1 [R=301,nc]

RewriteRule ^/$ index.php
RewriteRule ^realisations.html$ realisations.php
RewriteRule ^couvreur-toiture/services-de-toiture.html$ services-de-toiture.php
基本上,我需要.php文件以.html的形式显示,并且主public_html目录上的一些页面似乎位于子目录中

我的错在哪里?
提前谢谢。

您要访问的url中有500个错误?{HTTP_HOST}应该是大写的。添加重写库/有时会有所帮助。但我真的能看出有什么不对劲。