Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a website that host pages for multiple companies, typically they redirect a pag on their website to our website. However, we have a client that wants a custom domain. So we have traffic going to us from say customdomain.com and we want to redirect to a page on our existing site say admin.ourdomain.com/microsite/lookup.aspx?clientID=50.

Seemed simple. However, doing my research online I found what I through was a good example and it causes server 500 error every time for the entire site. Here's what I'm adding to the web.config:

 <system.webServer>
 ...
     <rewrite>
        <rules>
            <rule name="Redirect Geico Photo" stopProcessing="true">
                <match url="^customdomain$" />
                <action type="Redirect" url="http://admin.ourdomain.com/microsite/lookup.aspx?clientID=50" />
            </rule>
        </rules>
    </rewrite>
 </system.webServer>

The error says there's a problem with the web.config but it looks fine to me. Is there an order to where this goes? Thanks!

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.