routing

External linking and cakephp's routing enginge (multilangual)

Hi! I recently build a tiny routing 'extension', that calls the routes from a MySQL table (structure downwards). I think it's worth to be mentioned, that this page runs in multiple languages (German and Englisch). So - relying on the cookie, that's currently set in the client's browser - the corresponding routings get connected. The pr...

Server returning no response for certain URLs for Rails app on Apache2

I just implemented a new controller in Rails, and added routing info to routes.rb. Things work fine when I access the new URL on my local machine in dev mode. However, after pushing the changes onto my prod server and attempting to navigate to the URLs controlled by the new controller, I get no response from the server. I've tried restar...

Service Routing Table works in IIS7 but not IIS6?

I've got a WCF service that uses a Global.asax file to activate my services. So, my deployed virtual directory on my deployment box looks like web.config global.asax - which contains Services.dll and Services.pdb the Services.dll is the compiled bits of my Service.svc and Service.svc.cs files. How do I get this setup to work in IIS6?...

Codeigniter - best routes configuration for CMS?

I would like to create a custom CMS within Codeigniter, and I need a mechanism to route general pages to a default controller - for instance: mydomain.com/about mydomain.com/services/maintenance These would be routed through my pagehandler controller. The default routing behaviour in Codeigniter is of course to route to a matching con...

What's so RESTful about ASP.NET MVC?

REST has been such a popular buzzword for the last couple of years (or so) and when ASP.NET MVC was rolled out, everyone was relating REST with ASP.NET MVC. I also fell for the buzz and from the lack of my knowledge, my understanding of REST was simply just: REST = SEO/User friendly URLs But it's so much more. And the more I learn abou...

How do I redirect to a specific action in a different controller in Rails 3?

I'm writing an API; in this API, I have a FruitBasket model which has Fruits. A particular Fruit may belong to more than one FruitBasket at a time. FruitBasket and Fruit are both ActiveRecord objects. If someone performs a GET on /fruit/100/baskets, I want to provide a JSON list of baskets which have that fruit, in the form of basket ID...

CakePHP is interrupting images

Hi, I am using fckEditor as text editor. When i upload images thru it the images were uploaded to app/webroot/fckeditor/images. And when they're embedded it looks like /fckfiles/SalmonSashimi.jpg Until now it looks right. But the image doesn't appear. So when I browse the image directly, at here http://www.in-culture.info/fckfiles...

asp.net mvc outbound routing from a GET form post

I have a route that looks like this: new { controller = "ControllerName", action = "PhotoGallery", slug = "photo-gallery", filtertype = UrlParameter.Optional, filtervalue = UrlParameter.Optional, sku = UrlParameter.Optional} and I have a form that looks like this: <%using(Html.BeginForm("PhotoGallery", "ControllerName", FormMethod....

URL from action method name or MethodInfo or something, or listing action routes

I'm trying to document all the actions in my web app, and one of the things I want do is to provide a sample URL for an action. Is there a way to list all the actions in a website along with their routes, or maybe a way to find the route from a MethodInfo? I'm thinking I might have to write a custom attribute for each action to specify...

Creating Twitter-style routes with Rails3

How can I make Twitter-style routes with Rails3? I've tried the following: match ':username', :controller => "users", :action => "show" match ':username/:controller(/:action(/:id))', :path_prefix => '/:username' EDIT After some more digging through the docs, I did this and it seems to work: scope '/:username' do resources :clubs ...

Asp.net page routing not working

I am trying to add page routing (I use regular asp.net 4.0, not mvc), so that when a user goes to: http://sitename.com/public/member/view/andrey they would get to: http://sitename.com/public/memberprofile.aspx?userName=andrey I added following in Global.asax: protected void Application_Start(object sender, EventArgs e) { RouteTab...

Rails 3 returning a HTTP 406 Not Acceptable?

I have the following controller code: def create @admin = Admin.new(params[:admin]) respond_to do |format| if @admin.save redirect_to(@admin, :notice => 'Admin was successfully created.') else render :action => "new" end end end def update @admin = Admin.find(params[:id]) resp...

Socket 'No route to host' error.

I have a connection which is behind a restrictive firewall which only allows HTTP(S) access through a proxy (10.10.1.100:9401). The IP address I get is dynamic and the subnet mask is 255.255.255.255 (I know, weird!). I tried to write a simple Python socket program to connect to the proxy in order to send some HTTP requests: import sock...

asp.net MVC : when is IIS giving a 404 and when does it forward it to my app?

Hi, i was wondering about the following: i can define in IIS what to do with page not founds / 404, and also in my app i can put it in my CustomErrors section or just handle it in code. Now as i assume IIS always gets the request first, when does it handle the 404 for itself, and when does it let it pass through to my app? And a side...

Rails 3 ActionDispatch scope options

Do you know a resource which documents all the available options for the ActionDispatch scope method and their usage? I'm quite tired of digging into each merge_X_scope method trying to understand the X option implications. ...

Django: routing same model but different category field to separate URLs

I have the following model and url routes. There is one Post model that I want to route to different URLs based on the category. Is there a way to do this by passing in extra information in app/urls.py? In app/posts/models.py class Post(models.Model): author = ... title = ... body = ... category = models.CharField() ...

Asp.Net Routing to a generic handler

I Have a generic handler that's serving member logo images: http://site.com/logo.ashx?memberid=123 Now, I want to use it by caling a url like: http://site.com/logo/john.jpg So I would create a route for that (pattern: "logo/{username}.jpg"). But, my problem is - how do I retrieve {username} when inside ProcessRequest() of my generic...

2 domains using the same host, but routed differently

Hi folks, i have 2 domains (a.com and b.com) using the same application. However, I would need them to point to different routes. a.com should use the action: /home/a_index b.com should use the action: /home/b_index What is the right way to handle this in rails? ...

Optional string in Rails route

I want to add an optional string to an URL. I've tried this: map ":category/p:id(/:title)" => ... The title parameter should be optional, so that the user can insert a optional title or leave it. Sadly this does not work. Any ideas? ...

Rails: Preserving GET query string parameters in link_to

I have a typical search facility in my app which returns a list of results that can be paginated, sorted, viewed with a different records_per_page value, etc. Each of these options is controlled by parameters in the query string. A simplified example: /search?q=test&page=2 Now say I need to display a set of links that set records_per...