0

I wonder how to do specific redirection based on the scenario below?

When people open this url at browser http://www.test.com/gotogoogle it will redirect them to http://www.google.com.

2 Answers 2

1

You could use a RewriteMap in the IIS7 URL Rewrite module to achieve this..

http://learn.iis.net/page.aspx/469/using-rewrite-maps-in-url-rewrite-module/

Sign up to request clarification or add additional context in comments.

Comments

0

You can achieve this with URL Rewrite module. The rule will be (content of web.config from website root folder):

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Go To Google" stopProcessing="true">
                    <match url="^gotogoogle$" />
                    <action type="Redirect" url="http://www.google.com/" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

If you already have web,config, then add appropriate fragment only.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.