开发者

IIS7 Rewrite Rules How to Add: ignore extensions

I just added an new rewrite rule so I can redirect pages like:

www.Domain.com/PartnerNameHere/

to:

www.Domain.com/LandingPage?page=PartnerNameHere

However now all a开发者_如何学编程xd references are not working.

How do I set: ignore extensions for css,jpg,png axd..

IIS7 Rewrite Rules How to Add: ignore extensions


Current your match pattern for RewriteUserFriendlyURL1 is ^([^/]+)/?$, which makes no concession for extensions (it's matching any queries with a single URI segment).

If PartnerNameHere can never contain a ., then changing your match pattern to ^([^/.]+)/?$ should be sufficient.

If, however, you only want to block those specific extensions, you'll need to use this: ^(?![^/]+?\.(?:css|png|jpg|axd)$)([^/]+)/?$

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜