English 中文(简体)
How to set up 301 redirects in Kentico CMS
原标题:
  • 时间:2010-06-29 03:58:37
  •  标签:
  • kentico

How would you approach setting up 301 redirects within Kentico CMS (v5.0)?

I want to provide a client with an easy way (ideally through the CMS Desk interface) to set up 301 redirects in a website that has recently be re-implemented on Kentico. For example, I would want to redirect "old-page.cfm" to "new-page.aspx", and ensure that the HTTP response to the original request is 301.

I have an approach that looks like it works, but maybe there is a better way. I configured extensions-less URLs (per Kentico s documentation) and added a new document alias to the "new-page" document, specifying the "old-page" as the URL path and adding ".cfm" to the URL extensions list. Using Fiddler (HTTP Debugging Proxy) tool, it looks like what I want to have happen is happening: the request for "old-page.cfm" is returning a 301, redirecting to the "new-page" document, and returning a 200 response.

Does anyone know if this is a good approach for setting up 301 redirects in Kentico? Is there a better way? Are there any known drawbacks to using extension-less URLs in Kentico?

最佳回答

I think this is a good approach and I m not aware of any other way to accomplish 301 redirects without doing what your doing. I ve used Extension-less URLs in Kentico for awhile now and they work well.

问题回答

According to a Blog Post (Comment) by the CTO of Kentico:

... there are few new (so far experimental) settings in 4.0 (4.0 ONLY) you can put in the web.config file.

They are:

3) <add key="CMSUsePermanentRedirect" value="true" /> which allows 301 redirection in places where it makes sense, instead of 302 redirection.

2) <add key="CMSRedirectAliasesToMainURL" value="true" /> which you can use for better SEO. It does 301 on every URL which is not main for the document (NodeAliasPath). That should help you for now.

3) <add key="CMSRedirectInvalidCasePages" value="true" /> which goes even further and allows you to restrict the pages only to a specific case variant. When the case is not right, it gets 301 to the right case.

I m not sure what the status of these are with 5.X, but I m guessing they either work, or they are now configuration settings somewhere in the Site Manager.

I would install the IIS Rewriter module http://www.iis.net/downloads/microsoft/url-rewrite Then I would add a rule (permanent = 301) for all the .cfm pages to be processed by a custom handler.

For the customer I have to create a custom table with two columns that holds the relation between the old links and the new links.

That custom handler will then look into the custom table for any matches and then do the correct redirection.

I have implemented it in IIS6 for several clients moving from a php system to kentico using ISAPI Rewrite from Helicon (http://www.helicontech.com/isapi_rewrite/). It uses a .htaccess file at the root of the site. You could make this an edittable page from kentico if you needed to, or updatable from a custom field in page if you needed to, however we just got mapping list from our clients.

I believe you can do the same thing natively in IIS7 with one of the optional plugins.





相关问题
Kenitico CMS not getting configured

I am configuring the Kentico CMS to my local machine but getting the following error: The CISM115cis account is not granted with Modify permission on folder C:inetpubwwwrootKenticoCMS. ...

Kentico: How to redirect based on document type field

I have a certain document type in Kentico that has a boolean field that when true i need the page to redirect to another URL (in this case a 404 page). Where is the best place to do this? and how ...

Kentico CMS & Campaign Monitor

Just wondering if anyone has any pointers on how to integrate campaign monitor with Kentico CMS. Kentico has its own built in newsletter signup but I want campaign monitor to be updated when a user ...

Would developing in different CMS systems be beneficial?

At this point we are developing Sitecore websites and we are gaining experience every day. This means that we know how to adjust our approach to different types of customers and that we are able to ...

How to set up 301 redirects in Kentico CMS

How would you approach setting up 301 redirects within Kentico CMS (v5.0)? I want to provide a client with an easy way (ideally through the CMS Desk interface) to set up 301 redirects in a website ...

Kentico CMS search results

How do I change the Kentico CMS search settings so as to display a part of text from search results as in Google? Presently it shows only the path in the results.

热门标签