skip to Main Content

I am running around in circles here, I wonder if anyone can help.

I recently moved a static html website to Umbraco. It is running on a Windows plesk shared plan.

I need to put in place 301 redirects for the old content to the new but:

  1. Umbraco won’t receive requests for.html, there doesn’t appear to be a way to do this.
  2. I can’t get any server side running in the .html files that the plesk supports as custom error docs.

I was going to use client side meta redirects, but wasn’t sure if Google etc will read these right?

2

Answers


  1. I haven’t used it myself, but the Umbraco 301 Moved Permanently project looks like it does what you need.

    The real trick will be piping all requests for .html files through ASP.Net. I’m not sure if this can be done with your web host. But some tips can be found here:
    http://our.umbraco.org/projects/developer-tools/301-moved-permanently/feedback/7271-when-the-old-pages-are-not-from-umbraco

    p.s. You are correct that a client-side redirect will not help with SEO.

    Login or Signup to reply.
  2. you could add a rule in to your UrlRewriting.config the file sits here in the Umbraco installation… “~config/UrlRewriting.config”

    The rule would strip the .html extension from the page request. And would look something like the following…

    <add name="removehtml" 
            virtualUrl="^~/(.*).html" 
            rewriteUrlParameter="ExcludeFromClientQueryString" 
            destinationUrl="~/$1" 
            ignoreCase="true" />
    

    You would also have to make sure that the web.config file had the following key set to true

    <add key="umbracoUseDirectoryUrls" value="true"/>

    This would allow you to recreate your url structure with nodes inside the umbraco cms without the html or aspx extension. If all this seems too complex you could individually add each page you want to listen for to the corresponding node in the URL Alias property (umbracoUrlAlias). Umbraco will take this and redirect to your page.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search