routing

US Bank Routing Number and BIC/SWIFT

I've been having a hard time finding more information to this question, and since this site is visited by a lot of people from the United States, you guys might know/find the answer more easily. Banks in europe each have a SWIFT Number, while US Banks use Routing Numbers. This leads to following questions: Does each bank in the US als...

django powering multiple shops from one code base on a single domain

Hey, I am new to django and python and am trying to figure out how to modify an existing app to run multiple shops through a single domain. Django's sites middleware seems inappropriate in this particular case because it manages different domains, not sites run through the same domain, e.g. : domain.com/uk domain.com/us domain.com/es e...

Ending a Rails 2 URL with an IP address causes routing error?

I'm trying to construct URLs in the format http://servername/find/by/CRITERION/VALUE CRITERION is a finite set of strings, as is VALUE. Trouble is, VALUE needs to be an IP address in some situations, and it's causing me a routing error. Here's my route: map.find 'find/by/:criterion/:query', :controller => "find", :action => "by" ...

Asp.Net MVC Routing - Trying avoid using the same controller in different places and think routing may be an option here.

I'm currently building a site which has a bunch of main categories and in each category you can perform a search. Basically, I want my addresses to work like this... When the website loads (as in when someone goes to www.mySite.com) it will redirect them to the default category. www.mySite.com/Category Then when you search within a c...

How to avoid index.php in Zend Framework?

I'm using the Zend Router and so things like (/ and /index.php) or (/about and /index.php/about) ends up as the same here. However, /index.php/whatever should not exist as it is the exactly same resource as /whatever so it doesn't make a sense the duplication. How do I avoid this? Even http://zendframework.com/manual/en/zend.controlle...

Generate links for routes with non-parameter url segments on ASP.NET MVC 2

Hi everyone, I have a route defined with several hardcoded (non-parameter) segments: routes.MapRoute(null, "suggestion/list/by/{tag}", new { controller = "Suggestion", action = "List", tag = UrlParameter.Optional }); Suppose I'm in the Index view of SuggestionController, which has a Suggestion object for Model, how can I crea...

ASP.NET MVC - how to modify requested URLs?

The baidu spider seems to be adding ¤ to end of some crawled urls (it seems that it happens with urls containing single unicode character as the last character) The baidu-requested url looks like this: site.com/abc/ä¤ while site.com/abc/ä is the valid url and as linked from many places on my site. The internal problem is that a diff...

How do I refer to a constant URL in my route configuration?

Suppose I have the following within a webpage <% using (Html.BeginForm("ShowData", "Summary")) %> <% { %> <div class="dropdown"><%=Html.DropDownList("CourseSelection", Model.CourseList, new { @class = "dropdown", onchange="this.form.submit();" })%> </div> <% } %> When the user makes a selection from the dropdown the form is submitted...

ASP.NET 4.0 webforms routing

I have an existing site that I'd like to convert to use routing, and after reading Scott Guthrie's post here, I built a working sample that works for most circumstances. However, since not all of the pages on the existing site match a particular pattern, I'll need to check against a database to determine which route (destination .aspx ...

Easier way to generate paths

Songs on Rap Genius have paths like /lyrics/The-notorious-b-i-g-ft-mase-and-puff-daddy/Mo-money-mo-problems which are defined in routes.rb as: map.song '/lyrics/:artist_slug/:title_slug', :controller => 'songs', :action => 'show' When I want to generate such a path, I use song_url(:title_slug => song.title_slug, :artist_slug => song.a...

Rails - how can I capture the URL that directed to the current action in my app?

Hi - I need to see what page a request came from in my controller so I could be able to redirect back to it. For example, if I'm on a page showing a specific product (say /products/1) and it has a link to its vendor (/vendors/12), I want to be able to detect inside the vendors_controller that I came to that page from /products/1. Is th...

How can I use rails routes for dynamic 301 redirects?

I need to setup 301 redirects for my old URL's which have quiet high PR's. Indexed URL's are in this format: www.mysite.com/search/find?category[id]=7-Farming and want to redirect them, using 301, to: www.mysite.com/categories/find/farming In the 1st URL 7 is the id of the farming category, in the 2nd URL "farming" is a permalink....

Kohana 3 jQuery/AJAX request not working

I am trying to post some data to a controller in Kohana 3 using the jQuery AJAX method. I seem to have an issue with the data not getting to where I want it to be. I want the data to go to the /application/classes/controller/stock.php file where the file will process the data. I can't seem to figure this one out. Hopefully someone ca...

mvc consistent route parameters without re-initializing every action

Trying to consistently tack on a route parameter for every action without having to set it every action I tried this with ViewData but it seems ineffecient to do to every action. when I have over 40-50 actions, and Sessions are a no go for me. Is there a simpler way through filters or something else I could use? eg. http://localhost/myC...

Urls parameters doesn't encoding correctly!

I'am using asp.net mvc version 1.0 and I've a problem with some parameter in a url! My url is look like so(http://localhost:2282/Tags/PostList/c#) routes.MapRoute( "TagsRoute", "Tags/PostList/{tag}", new { controller="Tags",Action="PostList",tag = "" } ); In effect the problem is that tag para...

ASP.NET 4.0 Routing and Subfolders

I have a folder structure like this: www.mysite.com/About/About.aspx I have a link in a user control like this: <a href="~/About/About" id="aboutLink" title="About" runat="server">About</a> And in my RegisterRoutes() method, I have this: routes.MapPageRoute("", "About/About/", "~/About/About.aspx"); It works but produces the fol...

asp.net-mvc routing how to map Home/Action/id to just action/id ?

At the moment I have just this route defined routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } ); I want to map the /Home/Action1/id...

Generic Rails Route Representation?

Given one or more instances of a model (AR or DM, whatever). Is it possible to generate the route in the requirement form, by which I mean "/foos/:id" Given the route: resource :foo do resource :bar end generate_route_method [@foo,@bar] -> "/foos/:id/bars/:id" I'm not talking about #foos_path or #polymorphic_path, rather, literall...

How do you set up a default route to an area?

I have a folder called areas, in it I have 2 folders (Admin and Portal). How would I need to set up my Default route so when I start the site at the root site it routes it to Portal/Home/Index action? ...

Routing is using ID has action and action has ID after submitting a form

I have a model User that has_one user_profile and a User_Profile belongs_to user in the User controller I have: def personal @user = User.find_by_id(params[:id]) @user_profile = @user.user_profile @user_profile ||= @user.build_user_profile end def update_personal @user = User.find_by_id(params[:id]) if @user....