我的网站有问题,当我尝试将 php 转换为 html 时,出现此错误 未找到
这是 .htaccess
RewriteEngine on
RewriteRule ^(.*)\.php$ /ver1/$1.html [R=301,QSA,L]
文件夹 ver1 中的所有文件
我看到这篇文章
但不和我一起工作
我只需要将 php 转换为 html,如果我转到index.php
我转到index.html并将所有url设为html
最佳答案
将 .php 文件重命名为 .html 并将此行添加到 .htaccess
AddType application/x-httpd-php .html .htm
关于php - 如何执行扩展名为.html的php文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12292754/