locked
301 redirect of a site homepage only, without affecting other services on the same server RRS feed

  • Question

  • User-285706508 posted

    We need to be able to redirect all the pages on a 1-2-1 mapping for 301, the bulk of these being ok to do in web.config, but the site sits on a server with a range of other services that can't move and must remain visible to the original domain (.co.uk)

    The current site home page reached by going to www.oursitename.co.uk must now redirect to www.oursitename.com which will be hosted on AWS away from our own servers, the model used to date. We have managed to get rewrite to work but this still shows the old site name in the browser, we want to achieve the full 301 and the correct new site name in the browser. Struggling to make this work in web.config / redirect module. Any simple guidance please?

    Saturday, November 24, 2018 9:14 PM

All replies

  • User283571144 posted

    Hi swb2004,

    According to your description, I couldn't understand your issue and requirement clearly.

    Could you please share the rewrite rule you have used in your web application?

    We have managed to get rewrite to work but this still shows the old site name in the browser, we want to achieve the full 301 and the correct new site name in the browser.

    Do you mean you have used url rewrite instead of url redirect?

    As far as I know, a redirect is a client-side request to have the web browser go to another URL. This means that the URL that you see in the browser will update to the new URL.

    A rewrite is a server-side rewrite of the URL before it’s fully processed by IIS. This will not change what you see in the browser because the changes are hidden from the user.

    If you use url rewrite, I suggest you could modify the url rewrite rule to url redirect, it will make the whole page refresh and use the new site url and name.

    Best Regards,

    Brando

    Monday, November 26, 2018 5:42 AM