Home > Backend Development > PHP Tutorial > ISAPI_Rewrite的写法

ISAPI_Rewrite的写法

WBOY
Release: 2016-06-13 11:05:10
Original
937 people have browsed it

求一个ISAPI_Rewrite的写法
要求如下
http://www.abc.com/SNSN/1.html
http://www.abc.com/SNSN/12/1.html
http://www.abc.com/SNSN/1232/43/1/21.html

现在我想把上面的SNSN替换成snsn,也就是变成如下
http://www.abc.com/snsn/1.html
http://www.abc.com/snsn/12/1.html
http://www.abc.com/snsn/1232/43/1/21.html

也就是讲一个URL 这里是固定的:http://www.abc.com/snsn   后面不是固定的

求大侠帮个忙,谢谢。
------解决方案--------------------
RewriteEngine on

# 修改以下语句中的 / 为网站目录地址,如果程序放在根目录則修改为 /
RewriteBase /

# class.html
RewriteRule ^SNSN(.*)$ snsn$1 [NC]

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