Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

outbound rules in include file?

$
0
0

good afternoon:

I have rules, both inbound and outbound. The inbound rules are in a separate file which is referenced in my web.config file as:

<rewrite>
     <rules configSource="Rewrite.config" />
          <outboundRules>
                <rule name="OutboundRewriteUserFriendlyURL1" preCondition="ResponseIsHtml1">
                    <match filterByTags="A, Form, Img, Link, Script" pattern="^(/XXXX/XXXX/XXXX/XXXX/)([A-Za-z0-9-_/]+).aspx\??([A-Za-z0-9\&amp;\-_\=\.\;]+)?$" />
                    <action type="Rewrite" value="/XXXX/{R:2}.aspx?{R:3}" />
                </rule>
                <preConditions>
                    <preCondition name="ResponseIsHtml1">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                    </preCondition>
                </preConditions>
</outboundRules>

 </rewrite>

I have tried moving the outbound rule to the rewrite.config file, but it does not seem to work, what am I missing? the rewrite.config is basically as follows (i've removed the rules because there are a lot of them. where can i put the outbound rules, as I will have many of them and it would really muck up the web.config or the applicationhost.config. I was hoping I could put them in the same file as the rules. But for some reason it is not working for me, i get the dreaded 500 internal server error. I must be doing something wrong! please help!

<?xml version="1.0" encoding="utf-8"?>
<rules>
  <clear />

<rule name"etc"

</rule>

</rules>


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>