17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2053 Views |
-
Removal of /home redirection

10 May 2007 at 8:21pm
I created patch that disables primary redirection for site from
"http://www.somesite.com/" to "http://www.somesite.com/home/"
and if someone tries to get http://www.somesite.com/home or http://www.somesite.com/home/ will be redirected to http://www.somesite.com/Patch location: http://www.steki.net/code/download/silverstripe/
home_redir_removal.diffBoris
-
Re: Removal of /home redirection

11 May 2007 at 12:51pm Last edited: 11 May 2007 12:53pm
Thanks for this Boris - Andrew, can you please make sure this finds its way into the main branch
-
Re: Removal of /home redirection

17 May 2007 at 8:36am
Nice patch Boris!
It looks like 1 line was left out of this patch when it was applied and I get this error:
"Notice: Undefined variable: surl in /var/www/silverstripe/sapphire/main.php on line 110"This 1 line patch adds in the missing line to fix the error and make the redirection work:
http://www.elijahlofgren.com/silverstripe/patches/Add-missing-surl-silverstripe.2.0.DailyBuild.2007-05-16.patch -
Re: Removal of /home redirection

6 June 2007 at 11:46am
I didn't like the fact that this patch added a lot of code to main.php that was replicating code in RootURLController and Director. So I've patched SVN so that ContentController calls a new method called RootURLController::should_be_on_root($currentPage) to decide when to redirect from home/ to /.
It fixed some bugs with the system that were breaking on my local dev environment, and it also will now redirect home/?getvar=1 to /?getvar=1.
It doesn't redirect if there's an action (home/something) or post variables. It makes use of $controller->urlParams prepared by the director, rather than processing $_GET['url'] itself.
-
Re: Removal of /home redirection

25 July 2007 at 12:19pm Last edited: 25 July 2007 12:19pm
woohoo was hoping for this... how do we go about getting it?
-
Re: Removal of /home redirection

25 July 2007 at 1:32pm
You'll need to update your version of SilverStripe to 2.0.2
| 2053 Views | ||
|
Page:
1
|
Go to Top |






