0

I have been hosting my site in a shared environment at http://www.example.com/MYSITE/ for a while and I've built up a following there, I have decent ranking in Google and Bing, as well as I've been using the Facebook comment plug-in to allow users to comment on specific pages like http://www.example.com/MYSITE/Items/Details/52434.

I am moving to a dedicated server and the new version of the URLS listed above are http://www.example.com/ and http://www.example.com/Items/Details/52434

The site is an ASP.NET MVC site, I'd love to slam everything over, but I want anyone who goes to the old URLS to get sent to the right place. Is this something I can do with a web.config modification? I'd like to avoid a coding change if at all possible.

2 Answers 2

1

Your best bet would be a permanent redirect response code for the old URL page, sending the client to the new fully qualified path to where the content now lives. I would imagine if you had things well structured, you could use a pattern match. Failing that, you can do many many perm redirects.

This is no guarantee, however, that you will be able to retain the SEO/traffic from before. It will still take some time to "transfer" any ranking as the various crawlers and indexers out there catch up with your new site.

2
  • Any thoughts on how I can do this with UrlRewrite?
    – Nate
    Apr 9, 2013 at 21:16
  • Unfortunately, I've no experience with MS-based web services. :( Apr 9, 2013 at 21:32
1

Ended up doing a url rewrite. Added this to my web.config file:

<system.webServer>
  <rewrite>
    <rules>
      <rule name="Rewrite to article.aspx">
        <match url="^MYSITE/(.*)/(.*)" />
        <action type="Redirect" url="/{R:1}/{R:2}/" />
      </rule>
    </rules>
  </rewrite>
</system.webServer>

So my uris are now correctly redirected.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.