routing

Routing in ASP.NET

I need to use routing with parameters in my ASP.NET application. public class Global : System.Web.HttpApplication { void Application_Start(object sender, EventArgs e) { RegisterRoutes(); } private void RegisterRoutes() { var routes = RouteTable.Routes; routes.MapPageRoute( "Profi...

redirect domain name to local network internal ip (no requirement for external access)

i want to do the following: open a web browser on my local network. type in mydevice.com(or something similar) and have the browser redirect to the actual device (192.168.1.x) the reason is, it really is NOT for me. it is for a product that hosts a web page and i do not want the users to have to type in the IP address. also, i am awa...

Question about default route

Hi all: I learn this reference from MSDN.The pic below is a network topology which i am going to use. And quotation from the reference: Web Client: The Web client is connected to the 10.0.13.0/24 subnet and uses the IPv4 address of 10.0.13.110/24, the default gateway at 10.0.13.1, and the DNS server at 10.0.47.91. The We...

Kohana 3: Routing with subdirectories error, controller does not exist.

So I'm trying to build a route with sub directories and following the Kerkness wiki guide but keep getting errors. If someone could point out what I'm doing wrong I would greatly appreciate it. http://kerkness.ca/wiki/doku.php?id=routing:building_routes_with_subdirectories The code: Route::set('default', '(<directory>(/<controller>(/<...

Rails newbie: How to add routes to a rails 3 engine?

Hi folks, I'm trying to write my first rails 3 gem - everything works well, except for routes - I can't seem to get them working. It's possible this is a very simple error - as mentioned, it's my first experience with engines. The gem itself is very, very basic - literally just one scaffold My gem's config/routes file: class ActionCon...

Reset globally set routing suffix in symfony routing.yml file

Hi, I am using Symfony 1.3 and I have the following problem: I need a url in this format www.domain.com/folder (no suffix) however the application sets the default suffix to be .html Is there a way to override the global suffix in the routing.yml file? I could use mod_rewrite but I would like this link to be able to work without relying ...

Mono MVC 2 home route doesn't work

I'm trying to convert an ASP .NET MVC 2 app to run on nginx/mono 2.8. So far it seems to work quite well except that the default route doesn't work when the path is empty. I am proxying all requests through to the fastcgi server and I get served up with an ASP .NET 404 not found page. i.e. This doesn't work http://mysite.com But this...

Routing issues? with asp.net mvc 2.....

Hey guys, Having some problems with an ASP.net mvc 2 project. I believe it's a routing issue? but i may be wrong... What happens is I have a method that accepts an HTTPPOST and this method/action will then process an xml file that was sent using post. Now the problem is... every time I try to do any logic with the posted file my clien...

How can I call ASP.Net MVC based on urls checked against a lookup table?

I've got a unique requirement in my unique ASP.Net MVC project. Basically we are migrating an older Linux based website to MVC and we want to preserve the URLs which were on the last website. It is not practical to create a new controller for the subdirectory (ex. 'www.mywebsite.com/pickes/cherry-pickle-recipe.html') of the website. So...

Namespace routes aren't working

I have a route which looks something like this: map.namespace :a do |a| a.namespace :b do |b| b.connect ':controller/:action' end end I have a folder app/controllers/a/b which stores different controller files, all exist within a A::B module. This route works well on my local machine but it doesn't work on the server I'm depl...

Can I change my map.resources line in routes.rb to change the model name in the URL?

At the moment, I have this line in routes.rb map.resources :usernotes so my paths are /usernotes/new etc But I realise now I want them to be like /notes/new Is there a way to change the line in routes.rb to do this? ...

Making routes shorter

Hello! I have a model called Forum which has_many Topics. In routes.rb it's set up like this: resources :forums do resources :topics end This naturally gives me URLs that look like this: http://localhost/forums http://localhost/forums/1 http://localhost/forums/1/topics http://localhost/forums/1/topics/2 …you get the picture. I ...

ruby 1.8.7 mongrel 1.1.5 routing issue

I'm using Ruby 1.8.7 with rubyGems 1.3.7 and mongrel 1.1.5 and keep getting the following error. Error calling Dispatcher.dispatch # There is supposed to be a patch to fix this at http://gist.github.com/471663 but for when I add this to config/initializers my app fails to route the address correctly giving me an error from /config/ini...

ASP.NET Mvc - nullable parameters and comma as separator

Hello. How should I define route in my global.asax to be able use nullable parameters and coma as separator? I'm trying to implement routing rule for my search users page like "{Controller}/{Action},{name},{page},{status}" Full entry from the Global.asax: routes.MapRoute( "Search", "{controller}/{action},{name},...

Facebook page style urls in Asp.Net MVC

How would I write a route in Asp.Net mvc to handle a url like this one for a Facebook page: http://graph.facebook.com/http://codedojoboise.com/ I tried this route but get a 400 Bad Request error when I try to run it. routes.MapRoute( "LinkPreview", "LinkPreview/{path}", new {controller = "LinkPre...

Why isn't url_for rendering this like I think it should?

I have this in my controller: @statics = [{'home' => 'about'}, {'home' => 'termsandconditions'}, {'home' => 'information'}, {'news' => 'archives'}] and in my view: @statics.each do |controller, action| xml.loc url_for(:only_path => false, :controller => controller, :action => action) xml.lastmo...

Cakeph Routing help

I have a users module and few actions like wall, dishes, restaurants, photos. i wanna set up a routing like something like this site.com/users/{userId or Username}/wall => should route to wall() action site.com/users/{userId or Username}/dishes => should route to dishes() action site.com/users/{userId or Username}/restaurants => sho...

Full stop / period in URL breaks extensionless URL ... but only on release

Hi, Developing an application using MVC-style extensionless URL's. One of the pages has a url that sometimes contains an email address. On my local machine this works fine. However when I publish to the test server, trying to access this URL yields a 404 error, unless you take the full stop out, in which case it routes as expected. I'v...

Problem with routing rails 3.0.0 and --force-plural

Hi, sorry for bad English. For example i execute script/rails generate scaffold goods title:string --force-plural Then i follow to http://localhost:3000/goods/new and got error undefined method `goods_index_path' for #<#:0x7f1e7cb32530> I found some line involved in this behavour in polymorphic_routes.rb, but can't understand what ...

Codeigniter Routing Settings for Tank Auth

Hello, I'm using Tank-Auth for my application. And the only problem I have is activating and resetting passwords for accounts. For login, register, logout; I have no problem with this codes; $route['login'] = "/auth/login"; $route['logout'] = "/auth/logout"; $route['register'] = "/auth/register"; But for activating accounts and rese...