routing

Routing incoming requests to specific servers based on domain name

Hello! Right now I have a firewall (iptables, Apache, Squid, DNS installed) and a application server behind the firewall. Incoming traffic on port 443 (HTTPS) of the firewall is redirected to the app. server by iptables. So basically, neither Apache nor other application on the firewall is seeing HTTPS traffic. There is some web conten...

polymorphic associations and routing

Hi I am very new to rails and am having a problem with routing when using polymorphic associations. On I have a link "Add Comment" on the page installations/1/onposts/2 the link then goes to onposts/2/comments, this works and you can add a comment on this page, when you submit it just redirects to stay on the same page. I want to have a...

Find the atrributes on an action from the ViewEngine in ASP.NET MVC

I've got a custom ViewEngine and I want to modify the master page used depending on if the requested action has an Authorize attribute filter. So far I'm just using reflection like this: var method = controllerContext.Controller.GetType().GetMethod(viewName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase); if (me...

Object Reference not set in GetRouteData (System.Web.Routing)

This is driving me mad. I've implemented the Web.Routing on a Web Forms application. The application works fine and then inexplicably (at least at the moment) the following error message is thrown: Object reference not set to an instance of an object. at System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContex...

Is there a way to overload map.resources in rails?

I am trying to create clean urls in rails. I have installed PermalinkFu and I can generate the links just fine. What I would like to do is keep my RESTful resource. Is there a way I can overload: map.resources :location to return :permalink variable instead of :id? Similar to how I can create: map.connect 'location/:permalink' :c...

ASP.NET MVC Routing Via Method Attributes

In the StackOverflow Podcast #54, Jeff mentions they register their URL routes in the StackOverflow codebase via an attribute above the method that handles the route. Sounds like a good concept (with the caveat that Phil Haack brought up regarding route priorities). Could someone provide some sample to to make this happen? Also, any "b...

RESTful Authentication: Stumped trying to do simple redirect on cookie based authentication

I have a RoR application that's using the RESTful Authentication plug-in. Everything works great. I recently enabled cookie based authentication and that works fine too. The problem is that I want to change the default landing page when the user is authenticated using a cookie. I want to have a cookie authenticated user redirected to ...

Url routing with database lookup?

I want to build a ASP.NET MVC site so that the controller for a specific url is stored in the database instead of the URL. The reason for that is that i'm building a CMS system and the users should be able to change the template (controller) without changing the URL. I also think that the name of the controller is not relevant for the e...

adding a Route to the a Router in Zend Framework

I am using the mod-rewrite router. I am trying to add a Route to the router that will convert the following url: baseurl/category/aaa/mycontroller/myaction/param/value to be: Controller=mycontroller action=myaction --parameters-- category=aaa param=value I am using the following (not working) in my bootstrap, _front is the ...

How to specify a dynamic default for a key in a router, Zend Framework

This question is linked to this one How can I set the default of the category part to be the category value in the request url? $Router=$this->_front->getRouter(); $CategoryRoute = new Zend_Controller_Router_Route('category/:category/:controller/:action/*', array( 'controller' => 'index', ...

Can I do this with ASP.NET Routing?

I want to accept a url like this one "www.mysite.com/1-2,3" and turn it one like this "www.mysite.com/page.aspx?a=1&b=2&c=3". Basically I want to know if it's possible to lose .aspx portion, using routing? ...

Custom RESTful route within has_many nesting

Projects have many tasks and a task has a custom RESTful action called 'approve'. I'm expecting the helper to look something like this approve_project_task_url This isn't working for me: map.resources :projects, :has_many => :tasks, :member => { :approve => :post } ...

What does BGP Path Attribute Type 18 refer to?

Does anyone know what Path Attribute Type 18 refers to and how to parse it? The best I can understand is that it is a new AGGREGATOR (type 7) and I'm assuming that it's reading the new AS32 format, but that's not cutting it because I can't parse this packet. Is there an RFC that describes how this works...is it something special that C...

MVC, Dynamic routing, Unity, Determine if current controller exists in global.asax

What I'm trying to do is dynamic routing for my application. For instance, in Application_BeginRequest() I want to get the current controller and determine if it exists. If not, I want to add a set of routes that override the default routing so that my url looks like this mysite.com/term from database But, if the "term from databas...

Is there a way to redirect the browser from the bootstrap in Zend Framework?

I need to redirect according to some conditions in the bootstrap file. It is done AFTER the front controller and routes are defined. How do I do that? (I know I can simply use header('Location: ....) The point is I need to use the Router to build the URL. ...

ASP.NET Routing and Regular Expressions

I am trying to enable a route like the following route = new Route("{w1}-{c1}-{n1},{w2}-{c2}-{n2}", new ResultRouteHandler()); route.Constraints = new RouteValueDictionary(); route.Constraints.Add("c1", "(.*)|([-])"); route.Constraints.Add("c2", "(.*)|([-])"); RouteTable.Routes.Add(route); However I run into a problem when c1 or c2 is...

ASP.NET MVC How to correctly map a parameter in url-routing

Hi, I have the following route routes.MapRoute( "Segnalazioni_CercaSegnalazioni", "Segnalazioni/CercaSegnalazioni/{flag}", new { controller = "Segnalazioni", action = "CercaSegnalazioni", flag = 7 } ); that maps to the following methon of the class SegnalazioniController: public...

Rspec redirect_to routes are failing expectations (or misparsed?), how come?

It seems my rspec route for :controller => 'phones', :action => 'edit' works...it should be 'phones/123/edit', and IS according to rspec tests and rake routes. But when I create a redirect_to expectation, the expectation fails. Here's the routes test for the url: it "maps #edit" do route_for(:controller => "phones", :action ...

How do you solve the problems of URLs in a CSS file when using ZF?

I am using background images in my css, which, obviously, requires writing URLs in the css file. So, while the relative path might be the same, the base URL will be different between development and production. So, is there a better solution than: 1. changing it each time manually 2. using resources on the cloud with full URL 3. making t...

Refresh Routing Table on Windows 2003

Is it possible to refresh the routing table on a server running Windows 2003 without a reboot? If so, how? ...