.htaccess 用于显示 .html 文件
我在“test”文件夹中有三个文件,
one.php
two.php
print.html
并且在同一文件夹中有 .htaccess 文件,
RewriteEngine On
RewriteBase /test/
RewriteRule ^(.+)\.html$ $1\.php [L]
如果我们在浏览器中获取 print.html,则会出现错误,因为 .htaccess 文件, 因为没有“print.php”页面,
我们如何解决这个问题,通过修改 .htaccess 文件。这样在获取 print.html 时,它应该显示在浏览器中
I have three files in a folder 'test'
one.php
two.php
print.html
And i have .htaccess file in the same folder
RewriteEngine On
RewriteBase /test/
RewriteRule ^(.+)\.html$ $1\.php [L]
if we take the print.html in browser , there will be error , because of .htaccess file,
for there is no 'print.php' page
How can we solve it , by modifing the .htaccess file. So that while taking the print.html, it should display in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个。
Try this.