Hogan, Brian P.
2005-Nov-12 07:34 UTC
RE: URLs in IIS - Please look at my code and offersuggestions!
Zed: Thanks.... *should* work but doesn''t always..... Apache + SCGI works one way and IIS works the other.... The code I wrote seems to work in both places... Plus... I''m looking for a way to develop the app with WEBrick and then just make a fix for deplyment without having to modify the rails app... I think it''s Typo that has something like 50 routes defined... You''d have to double them up to ensure that it works in all cases. I''ll keep playing around with routes though. -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Zed A. Shaw Sent: Friday, November 11, 2005 8:26 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] URLs in IIS - Please look at my code and offersuggestions! I did this by using the routes.rb config to prefix the base uri for all of the requests. This also fixes quite a few other problems with redirect_to and render as well. Remember, the routes system goes in two directions: * /stuff/dome ---> StuffController.dome redirect_to :controller => "stuff", :action => "dome" ---> /stuff/dome So if you setup your routes to require a prefix then it *should* generate the prefix on the redirect_to call. Zed A. Shaw http://www.zedshaw.com/ On Fri, 11 Nov 2005 15:55:03 -0600 "Hogan, Brian P." <HOGANBP-VnAisaAFmHY@public.gmane.org> wrote:> Jeremy: as I said on > > http://dev.rubyonrails.com/ticket/2602 > > "If I have a "project" controller and a "show" action, why does Rails > "link_to" insist on doing "/project/foo" which will go to the root of > a webserver? The reason is that Rails is assuming that the app is > mounted to the base of a server and it''s easier to do that than to > figure out how the relative paths would work." > > IIS / Apache + SCGI have this need ONLY if the app is run in a > subfolder (i.e.. NOT the root of the webserver or vhost). > > Rails currently (unless you symlink - again, a hack) assumes that > you''ll run your app in a vhost configuration. That might work for > intranets, but I might want to do this > > www.uwec.edu/biology/coolapp >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails