Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web.Config URL Rewrite Question

Status
Not open for further replies.

Krus1972

Programmer
Mar 18, 2004
145
US
I am using the following rule in my web.config file and I am having a few issues. I hope someone can help:

Code:
     <rewrite>
       <rules>
          <rule name="Shopping">
             <match url="^([_0-9a-z-]+)" />
             <action type="Rewrite" url="?thesearch={R:1}" />
          </rule>
          <rule name="Reviews">
             <match url="^([_0-9a-z-]+)/reviews" />
             <action type="Rewrite" url="/Reviews_Desktop.asp?thesearch={R:1}" />
          </rule>
       </rules>
    </rewrite>

1.) Does anyone know how I can exclude certain keywords from the "Shopping" Rule? For example I would like to exclude "popularkeywords" and "auctions" from the "Shopping" rewrite rule. If a URL such as http://mydomain.com/popularkeywords or http://mydomain.com/auctiions gets used, the server will NOT rewrite it. Is it possible to exclude certain keywords in this fashion?


2.) The "Reviews" rule will not work because the "Shopping" rule kicks in before hand. Is there anyway to have the server ignore the "Shopping" rule when there is a /reviews/ at the end of the URL as shown in the "Reviews" rule?

I would appreciate any help.

Thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top