routing

Is it possible to have app level routes take precedence over plugin level routes in Symfony 1.4?

I'm developing a Symfony 1.4 plugin and I noticed that plugin routes get matched before app level routes. Is it possible to have app level routes evaluated first? ...

Routing POST and GET Requests: Controller or Dispatcher?

When you're making a web app, you frequently need different things to happen at a given URL for HTTP POST requests than happen for HTTP GET requests. I am making a web app in Pylons, and I'm encountering this question. Is it better to distinguish between POST and GET in my URL dispatcher (Routes) or in my controllers? What factors wou...

Is it possible to override the relative path ~/ throughout my web application?

Back Story I am currently updating an existing web application to support a multi-tenant environment. Today we current host an application on http://www.example.com/MyApp, but now we must be able to support multiple clients on the same web application. So each client should be able to access the application through urls like: http://...

How to make asp.net routing use a different application path

In an asp.net mvc application, I would like to be able to generate views, where the routing engine will create all URLs that point to a different site, i.e. change the application path. ...

URL routing in mvc

Hi, I have this url working in my code: http://localhost:12345/home/index/&lt;parameter1&gt;/&lt;parameter2&gt;/&lt;parameter3&gt;/&lt;parameter4&gt; I want to change my url to NOT to include the home/index (<controller>/<action>). My current Global.asax entry is like: routes.MapRoute( "Default", // Route name "{controller}/{...

Route matching with GetVirtualPath

I've got the following routing in my application... public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Branding", "foo/bar.css", new { controller = "DynamicContent", action = "CSS" } ); routes.MapRoute( "Default", "{controller}/{ac...

nested routing in rails

Desired url, a geo example: domain.com/france/ # Would show all things to do in France domain.com/france/ile-de-france/ # Would show all things to do in Ile-de-France domain.com/france/ile-de-france/paris # Would show all things to do in paris This geographical url writing is quite easy of course with rails routing. Problem is that it...

RESTful Rails Put/Post fail problem

So using Rails' REST resources routing, we end up with auto-generated routes that coordinate with Controller actions (I'll refrain from ranting about how I've replicated models twice, as well as relationships twice (as models and then as (often) nested resources; as well as actions twice (as I limit my resources with onlys/excepts where ...

Rails 3 can't find route to static page

Am working my way thru Ruby on Rails Tutorial: Learn Rails by Example. I'm in the section entitled Mostly Static Pages. I get an error after I create an HTML page in the public directory which is called public/hello.html and should appear as in Figure 3.3. My problem is that when I try to create the page and make it appear at localhost:...

Rails: strange behaviour with trailing slashes on my scoped routes

The locale switching on my site is behaving strangely. I decided to go with a scoped route for switching locales: scope ":locale" do devise_for :accounts resources :eventos root :to => "eventos#index" match '/sign_in' => "Devise::Sessions#new", :as => :sign_in, :constraints => { :method => "get" } match 'sign_in' => "Devise...

Symfony routing problem - what am I doing wrong?

I am learning Symfony and I'm working with the following URI: url_for('newItem/show?id='.$item->getId().'&name='.$item->getName().'&summary='.$item->getSummary()) With the below routing.yml item_show_user: url: /newItem/:name/:summary param: {module: newItem, action: show} # default rules homepage: url: / param: { mod...

Making a single create form using Single Table Inheritance in Rails

Hello, I'm using STI in Rails, and I've got a Vehicle object, that has many different types of subclasses, like Car, Truck, etc. It's for a simple app, so STI works fine in this case, but I'm having trouble creating a single form where any type of Vehicle record can be created. Using the following routing: resources :vehicles resource...

Rails restful routes and singular resources

I am having a problem with restful routes and singular resources, originally I had this code in the show view on my account resource. <%= link_to book.title, book_path(:search => book.title) %> and it worked fine, then I changed account to be a singular resource, e.g from map.resources :accounts to map.resource :account and now...

Routing questions with rails

Hi, I am just starting with rails and I have a very simple case. I have a "home" controller. There is one action 'index' defined in this controller. When I go to ~/home I get an error msg saying: uninitialized constant HomesController (I noticed the singular/plural thing). That's the first thing I don't get (I thought it would automa...

Session in ASP.NET routing vs MVC

I was rewriting my routing handlers, and now I found a need to access session in the handler, which I previously thought, was not possible. However a quick search turned up with this question, answer for which is accepted, so I'm assuming it did work. Session is still null when I try to do the same thing. Am I missing something or is th...

myapp.com/@username url in rails routes

Hi I have a simple rails question that I am simply unable to figure out. like the title says, I want to get my users controller show page to have the myapp.com/@username url but I don't know how to do this. My knowledge of routes must be fundamentally flawed. my links now usually look like this: <%= link_to "#{@user.username}", :contro...

ASP.NET MVC default path

I am trying to figure out how to route my application to a default controller/task/id when none is specified in a request. Here is my one routing instruction... routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "LML", action = "TaskLibrary", ...

kohana 3 routing problem with controller action parameter

I have this routing defined in my module's init.php; Route::set('store', 'store/<store_id>(/<controller>(/<action>(/<id>)))', array( 'store_id' => '\d+' )) ->defaults(array( 'controller' => 'main', 'action' => 'index', )); and the default route in bootstrap.php is still intact. Route::set('default', '(<cont...

Routing to an Area home page in ASP.NET MVC

I'm trying to route to the home page of an Area in MVC, e.g. myDomain.com/myArea/Home/Index when I use the URL: myDomain.com/myArea MVC appears to by trying to find a Controller called "myArea" in the root Controllers folder and thereby would route to: myDomain.com/myArea/Index if the Controller existed. Again, I want: myDomai...

Dispatch requests to other servers based on API key

I am designing an app that requires that all requests to our servers be routed through a single 'dispatcher'-type server. This server will, based on an API key sent in the request, forward the request on to an appropriate backend server, than relay the response back to the client. eg., an incoming request could be http://example.com:657...