WebFaction
Community site: login faq

I want to rename some pages in my Zope/Plone site and I would like to do a 301 permanent redirect so as not to lose the search engine rankings for the old url's

On a normal site I could do this with a htaccess file but on the plone site it doesn't seem to have any effect. I understand that Apache is redirecting the requests to Zope but I want to run my redirect rules before it gets passed on.

Is this possible?

asked 01 Feb '11, 10:10

espprojects
111
accept rate: 0%


There is Redirection Tool which might work for you.

If not, then you can do the following:

  1. Move the content to its new location.
  2. In the ZMI, create a Python Script object with the same location and id as the old content. The script contents needs to be a one-liner like this: container.REQUEST.response.redirect('http://foo.com/bar',301)

Just change http://foo.com/bar to the location of the new content. When visitors hit the old location, the script will redirect them to the new one.

Note that this should only when you want to redirect one specific URL to a new URL. If you want to do a general redirect, like redirecting your 'www' subdomain to your main domain for SEO purposes, then you should handle that via a static app, as described here: Redirect a Domain with a Static/CGI/PHP App

Hope that helps!

permanent link
This answer is marked "community wiki".

answered 01 Feb '11, 10:39

seanf
12.2k41836
accept rate: 37%

edited 17 Mar '11, 20:06

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×23
×18
×9

question asked: 01 Feb '11, 10:10

question was seen: 8,012 times

last updated: 17 Mar '11, 20:06

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM