[Dancer-users] redirect path is wrong

Mr. Puneet Kishor punk.kish at gmail.com
Mon Jun 4 23:24:06 CEST 2012


I have a URI http://server/app/d/geomaps/resource.json

I have changed it to http://server/app/d/geomaps/gmna/resource.json

In my code, I have put the following

	get '/resource.:format' { return redirect '/gmna/resource.:format'; };
	get '/gmna/resource.:format' => {
		..
	};

But the above fails. One, the redirect doesn't seem to recognize and carry the .:format through (if I call resource.json, the program complains that '/gmna/resource.:format' wasn't found). Second, it doesn't prefix the /app/d/geomaps part to the redirected URI.

How can I fix this?


--
Puneet Kishor



More information about the Dancer-users mailing list