1101 Posts in 480 Topics by 394 members
|Go to End|
19 June 2010 at 8:28pm Last edited: 19 June 2010 8:29pm
I was under the impression after looking at the docs that 2.4.0 with nested URLs activated will redirect a page's old URL to the new nested one.
I just upgraded a site from 2.3.5 to 2.4.0 and found that this is working in my case.
Old URL (2.3.6) - www.mysite.com/lost-civilizations-la-paz-to-lima/
New URL (2.4.0 - automatcially generated after upgrade with no page organizational changes) - www.mysite.com/tours/lost-civilizations-la-paz-to-lima/
While the new URL is perfect, I find the old URL just gives a (Silverstripe) 404 error, which is no good for SEO.
Can anyone advise on the behavior? I may be missing a config option here. The only thing I have added to the config is SiteTree::enable_nested_urls();. I could do this manually in htaccess, but it will be very time consuming with the amount of pages my customer has.
20 June 2010 at 3:51pm
Once you have run the migration task then the old URLs should automatically fire 301 redirections from the old site. I think this is based off the versions table (or maybe just the url segment of the page). AFAIK this is automatic for example http://silverstripe.com/team we added nested urls and it moved to http://silverstripe.com/about-us/team without any changes. I have no idea how it actually works so hopefully someone else who knows will be able to help but take a tiny bit of comfort that it *should* be working
20 June 2010 at 8:35pm
I guess I might be having trouble getting my head around the way this should work on the page structure side. These pages have not been moved at all at this stage. All I have done is upgrade my dev copy to 2.4.0 and activated nested urls. The physical structure is the same:
Before the upgrade, the urls were just www.mysite.com/tour-1 and www.mysite.com/tour-2. After the upgrade and nested url activation they were www.mysite.com/tours/tour-1 and www.mysite.com/tours/tour-2.
This is perfect, however I can't see how silverstripe could possibly redirect the URLs when the physical pages do not change. I am guessing things would be different if Tour 1 and Tour 2 were in the root rather than the sub directory?
4 July 2010 at 9:50pm
Still no joy with this. Tried the upgrade on my dev environment a few times now.
Has anyone out there done a 2.3.x -> 2.4.0 upgrade and can confirm 301 redirects work automatically for old page urls? If so, can you detail the upgrade process. I have followed the Docs to the tee.
As a side note, it would be interesting to know what will happen if the 301's do automatically work, what the deal is when you create a page with the same original URL (that is automatically being redirected).
15 July 2010 at 5:04am
That bug had been fixed with the following changeset: http://open.silverstripe.org/changeset/104463
|Go to Top|