IIS 8.5 Rewrite issue

I am trying to exclude the directory "myrtle-beach-golf-blog"
I have tried these different combinations.  They do not seem to work.  I get a 500 error on both.

 <rule name="rule 1P" stopProcessing="true">
	           <match url="^([a-zA-Z0-9-/]+)$"  />
			   <conditions>
					<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
					<add input="{REQUEST_URI}" negate="true" pattern="myrtle-beach-golf-blog.*" />
					<add input="{REQUEST_FILENAME}" negate="true" pattern="^myrtle-beach-golf-blog.*" />
				</conditions>
	           <action type="Rewrite" url="/index.cfm?{R:1}"  />
            </rule>

Open in new window


and

 <rule name="rule 1P" stopProcessing="true">
	           <match url="^([a-zA-Z0-9-/]+)$"  />
			   <conditions>
					<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
				</conditions>
	           <action type="Rewrite" url="/index.cfm?{R:1}"  />
            </rule>

Open in new window


Any ideas on what I am missing here?

Other rewrites are working accordingly...
LVL 6
rjohnsonjrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BigRatCommented:
It's ages since I did this, but why don't you just match the directory in the "match-url and action it to index.cfm?
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
i tested the following rule out on my site and it seems to do what you want, you just need to change the destination to index.cfm:

        <rewrite>
            <rules>
                <rule name="rule1" stopProcessing="true">
                    <match url="myrtle-beach-golf-blog/(.*)" />
                    <action type="Redirect" url="/index.asp" />
                </rule>
            </rules>
        </rewrite>

Open in new window


test link - http://www.exchangetree.org/myrtle-beach-golf-blog/

I'll leave the rule up for a few days, or until you get a chance to test it on your end
0
rjohnsonjrAuthor Commented:
Big Monty,
You were correct but with a slight tweak:
<rule name="rule1blog" stopProcessing="true">
                    <match url="myrtle-beach-golf-blog/(.*)" />
                    <action type="Rewrite" url="/index.cfm?{R:1}" />
</rule>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rjohnsonjrAuthor Commented:
My comment was the actual solution but Big Monty got me there.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.