Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

2.4 upgrade - nested URLs and old URL redirects?

Go to End

5 Posts   2076 Views


Community Member, 607 Posts

19 June 2010 at 8:28pm

Edited: 19/06/2010 8:29pm

Hi there,

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) -
New URL (2.4.0 - automatcially generated after upgrade with no page organizational changes) -

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.



Forum Moderator, 5523 Posts

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 we added nested urls and it moved to 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 :D


Community Member, 607 Posts

20 June 2010 at 8:35pm

Cheers Will,

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:

----->Tour 1
----->Tour 2

Before the upgrade, the urls were just and After the upgrade and nested url activation they were and

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?



Community Member, 607 Posts

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).


Community Member, 15 Posts

15 July 2010 at 5:04am

That bug had been fixed with the following changeset: