重定向.php到.html扩展404错误


redirect .php to .html extensions 404 error

我试图将所有.php文件转换为使用.html扩展名运行,但它给了我404 Page Not found error:

如果我运行扩展名为.php的文件,它运行得很好,但扩展名不是.html,我也检查了mod_rewrite is enabled

我安装了Ubuntu 12版本和PHP 5.3。

htaccess代码如下:

AddHandler application/x-httpd-php .php .html
AddType application/x-httpd-php .html
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)'.html$ $1.php [L]
#RewriteCond %{REQUEST_URI} ^(.*)'.php$
#RewriteRule ^(.*) /$1.html [R=301,L]

请帮帮我,怎么了?

谢谢!

它与一起工作

RewriteEngine On
RewriteRule ^(.*)'.html$ $1.php [L]