无后缀url如何实现?_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:29:16
Original
1235 people have browsed it

我有个网站,全是.htm文件,有目录,现在想实现无后缀url访问,比如原先是www.333.com/about.htm,现在输入www.333.com/about就能访问到,如何实现,请不要只说用某技术,请给个例子


回复讨论(解决方案)

http://www.cnblogs.com/net-nai/archive/2011/12/30/2307760.html

http://www.cnblogs.com/net-nai/archive/2011/12/30/2307760.html



大神,我的网站不是.net网站,全是htm文件,以后可能会增加一些asp文件,该怎么引用这个重写组件?

这个也可以用
http://www.cncnc.com.cn/news/shownews-623-1.html

这个也可以用
http://www.cncnc.com.cn/news/shownews-623-1.html



多谢大神,这个可以用,但是我只会写单个文件的规则,网站里有近500个htm文件(都是数字名字),包含在数个目录里边,目录有5层,批量规则该怎么写?



RewriteRule ^(.*?\w)$ /$1.htm

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!