Bypass a RewriteRule

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Bypass a RewriteRule

25 May 2012, 17:35

Hello
I have this line below that converts my cfm links to aspx links and I love it.

RewriteRule ^(.*)_(.*)\.cfm$ $1-$2.aspx [NC,R=301]

The problem is that I have these two links below that I want to keep as they are literally and not have them affected by the code above. Please help, here they are:

http://mysite.com/admin/tiresearch/Impo ... _Model.cfm
http://mysite.com/Admin/InventoryUpdate ... update.cfm

I want to keep these two links but I can't seem to figure out how to keep them from being affected from changing to aspx

Thanks,

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Bypass a RewriteRule

28 May 2012, 06:28

Hello,

The most direct solution would be the following:

Code: Select all
RewriteCond %{REQUEST_URI} !^/admin/tiresearch/Import_Year_Make_Model\.cfm$ [NC]
RewriteCond %{REQUEST_URI} !^/Admin/InventoryUpdate/inventory_update\.cfm$ [NC]
RewriteRule ^(.*)_(.*)\.cfm$ $1-$2.aspx [NC,R=301]


Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 5 guests