简体   繁体   English

无需php即可清理网址

[英]Clean url without php

I used .htaccess to remove the file extensions on my webpage. 我使用.htaccess删除了网页上的文件扩展名。 I have deleted htaccess on my root folder on my website but a url like www.mywebsite.com/dashboard rewrites to www.mywebsite.com/dashboard.php 我已经删除了网站根目录中的htaccess,但是类似www.mywebsite.com/dashboard的URL重写为www.mywebsite.com/dashboard.php

Is there anyway that the web server has cached the .htaccess file? Web服务器是否已经缓存了.htaccess文件?

No it is because of MultiViews : 不,是因为MultiViews

Options MultiViews

Try adding this line in your .htaccess to stop this behavior: 尝试在您的.htaccess添加此行以停止此行为:

Options -MultiViews

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM