[TYPO3-english] Riedirects in RealURL when changing the name of a section
Ron Hall
ronslists at busynoggin.com
Sun Nov 16 04:52:34 CET 2008
Hi Dimitry,
I waited to respond on this to try some more things. I think I have
found an answer and wanted to close the thread with what I came up with.
Given the example I gave of a page tree of:
Section 1
Section 2
Page 1
Page 2
Page 3
Section 3
Section 4
If I change the name of of a subpage like "Page 3" to "New Page 3"
then RealURL will make a new ID-to-path mapping the reflects the new
name and also set the old path to "expired" which will send a
permanent redirect response if someone hits the old url. This is fine
However, if instead I change the section page, say "Section-2" to
"Section-2-New" then "Page 3" will respond to both "mydomain.com/
section-2-new/page-3" and to "mydomain.com/section-2/page-3" and it
does not give a permanent redirect response on the old url which is
what I want.
Of course, in the case of a small section it is no trouble setting up
redirects manually but for large sections it could be an issue
Having said all that it looks like I have figured a way to handle such
a situation.
I have used a directive in the apache configuration like this:
RedirectMatch permanent /section-2/(.*)$ /section-2-new/$1
This takes any of the old URLs and reroutes them using the new section
name in the url and sends a permanent redirect as a response code.
This is what I want since the reason for all this is to send the
proper response to search engines to help with SEO.
Also, I think it is probably good after doing all this to clear the ID-
to-Path mapping for the section so it can all be regenerated.
Thanks,
Ron
On Nov 12, 2008, at 9:14 AM, Dmitry Dulepov wrote:
> Hi!
>
> Ron Hall wrote:
>> Is there a way to set up code to handle redirects for all pages in
>> the
>> section so that Google gets a proper permanent redirect or do I
>> have to
>> set up redirects for each page? Having to do for each page could be
>> daunting or prone to error on a section with many pages or news
>> pages.
>
> Doesn't it work already?
>
> --
> Dmitry Dulepov
> TYPO3 translations support
> My TYPO3 book: http://www.packtpub.com/typo3-extension-development/
> book
> In the blog:
> http://typo3bloke.net/post-details/
> max_os_x_use_php_help_in_chm_format/
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
> Ron Hall wrote:
I have a site where I want to change a name of a section. Say I have a
page tree like this:
Section 1
Section 2
Page 1
Page 2
Page 3
...
Section 3
Section 4
I want to change the name of "Section 2" to "My New Section 2"
Of course, the url for all the pages in that section will change. For
example,
mydomain.com/section-2/page-1/
will change to
mydomain.com/my-new-section-2/page-1/
Is there a way to set up code to handle redirects for all pages in the
section so that Google gets a proper permanent redirect or do I have
to set up redirects for each page? Having to do for each page could be
daunting or prone to error on a section with many pages or news pages.
Thanks,
More information about the TYPO3-english
mailing list