Developer forum

Forum » Development » Redirect all traffic to new domain using web.config

Redirect all traffic to new domain using web.config

Filip Lundby
Reply

I would like to redirect all traffic to a new domain. I've tried two different configurations, but non of them takes effect:

<httpRedirect enabled="true" httpResponseStatus="Permanent" destination="http://www.newdomain.com/" />

And ...

<rewrite>
    <rules>
        <rule name="Redirect All" stopProcessing="true">
            <match url=".*" ignoreCase="true" />
            <action type="Redirect" url="http://www.newdomain.com" redirectType="Permanent" appendQueryString="false" />
        </rule>
    </rules>
</rewrite>

 

I'm placing the configurations inside <system.webServer>

What might be wrong?


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Filip

I do not know what is wrong - you have to look in asp.net or IIS forums instead.

But Dynamicweb can do this for you. On a website properties, you can set both domains in the domains box and then set the new domain as the primary domain. Then Dynamicweb will 301 redirect to the new domain. Read more in the manual: http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Modules/Websites/Module-setup/Edit-website.aspx

 
Filip Lundby
Reply

Hi Nicolai

Thanks, I've already tried it. But it redirects URL's 1:1, like so: olddomain.com/somepage.aspx -> newdomain.com/somepage.aspx

But what I want is make all URL's point at frontpage: olddomain.com/somepage.aspx -> newdomain.com 

It's an older version of DW (http://screencast.com/t/9zracinXlra), so I havent got all the options show in the documentation. 

 

You must be logged in to post in the forum