how to implement one rewritecond for multiple rules

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 7
Joined: 16 Oct 2015, 03:30

how to implement one rewritecond for multiple rules

16 Oct 2015, 07:44

Hi Support.

I have two domains for a site. the one is for review. and another is for edit. we will use the short url for review site.
e.g.

RewriteCond %{HTTP:Host} ^www\.mydomain\.com$
RewriteRule ^contact-us.aspx$ contact-us [NC,R=301, L]

RewriteCond %{HTTP:Host} ^www\.mydomain\.com$
RewriteRule ^trademarks.aspx$ trademarks [NC,R=301, L]

RewriteRule ^contact-us$ contact-us.aspx [NC, L]
RewriteRule ^trademarks$ trademarks.aspx [NC, L]

Can I use one RewriteCond for multiple rules? because they are same.

Thanks,
Gan

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: how to implement one rewritecond for multiple rules

16 Oct 2015, 11:02

Hello.

Duplicating my answer from ticketing system:

'S' or Skip flag is supported in both ISAPI_Rewrite 3 and Helicon Ape, so you can use the technic you are referencing on Stackoverflow: http://stackoverflow.com/questions/7218 ... n-htaccess

User avatar
Posts: 7
Joined: 16 Oct 2015, 03:30

Re: how to implement one rewritecond for multiple rules

28 Oct 2015, 03:32

no, the [S] flag is not working on IIS.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 28 guests