Root domain redirect

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
4/4/2011 4:38:46 AM
Gravatar
Total Posts 16

Root domain redirect

Hi

Currently my website can be accessed by either http://winkell.co.uk or http://www.winkell.co.uk - i want to ensure that all requests are serviced by the http://www.winkell.co.uk. I have found instructions on the web for entering code into web.config under the <system.webServer> tag such as:

<rewrite>

<rules>
<rule name=”Add WWW prefix” >
  <match url=”(.*)” ignoreCase=”true” />
    <conditions>
      <add input=”{HTTP_HOST}” pattern=”^domain\.com” />
    </conditions>
  <action type=”Redirect” url=”http://www.domain.com/{R:1}”
    redirectType=”Permanent” />

</rule>
</rules>
</rewrite>

However this just gives me errors. How can i configure a redirect so that any requests to http://domain.com/* go to http://www.domain.com/* ?

Thanks

Andy

 

4/4/2011 6:48:05 AM
Gravatar
Total Posts 18439

Re: Root domain redirect

Hi Andy,

There is built in support for this in mojoPortal.

See Forcing a Preferred Host Name.

Best,

Joe

4/4/2011 7:50:03 AM
Gravatar
Total Posts 16

Re: Root domain redirect

Thanks Joe,

 

Didn't know about that setting. Worked a treat. 

 

Andy

You must sign in to post in the forums. This thread is closed to new posts.