[Dancer-users] redirecting to a renamed sub app

Puneet Kishor punk.kish at gmail.com
Wed Mar 14 01:43:10 CET 2012


solved (see below)


On Mar 13, 2012, at 4:13 PM, Puneet Kishor wrote:

> In my main app, I load a sub app like so
> 
> 	package mainapp;
> 
> 	# old invocation
> 	#load_app 'subapp1', prefix => '/subapp1';
> 
> 	# app renamed
> 	load_app 'subapp2', prefix => '/subapp2';

	get '/subapp1' => sub { redirect '/subapp2'; };

> 
> 'mainapp' itself is behind an Apache proxy, so all requests to http://foo.edu/ go to port 5000 where 'mainapp' is being served by Starman.
> 
> Well, I've done gone and changed 'subapp1' to 'subapp2' and I thought setting a `Redirect permanent /subapp1 /subapp2` would take care of everything. Well, I was wrong. Dancer croaked that no subapp2 found. I figure I have to set the redirect in Dancer, but, now I am not sure where to set that.
> 
> 	package subapp2; # used to be subapp1
> 
> 	get '/' => sub {};
> 
> Redirect in dancer seems to be at a route level. How do I redirect an entire app?
> 
> 
> --
> Puneet Kishor




More information about the Dancer-users mailing list