On Wed, Oct 12, 2011 at 22:20, Nokan Emiro <uzleep...@gmail.com> wrote:
>> It seems to me that PATH_INFO is still not properly handled, but that
>> it's always empty.
>
> You are right, PATH_INFO is always empty.  If I fill it with the
> $SCRIPT_NAME
> value, controllers can be accessed again.  But links generated by R() are
> still wrong:
>
> a 'Add', :href => R(Add)
>
> on a page xxx.com/list goes to xxx.com/list/add, not to xxx.com/add .

SCRIPT_NAME is the mount-path.
PATH_INFO is the internal app-path.

So if you want your application available at xxx.com/my_app/, then the
request xxx.com/my_app/add will look like this:

  SCRIPT_NAME="/my_app"
  PATH_INFO="/add"

If it's available at xxx.com/, then xxx.com/add will look like this:

  SCRIPT_NAME=""
  PATH_INFO="/add"

Camping uses PATH_INFO for route dispatching and SCRIPT_NAME for route
generating.

In this case you probably want to explicitly set SCRIPT_NAME to "".
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to