url-routing

in Ruby on Rails, does map.resources :stories immediately make Story RESTful?

I was reading Simply Rails by Patrick Lenz... maybe I missed something, it seems that whenever we put map.resources :stories in routes.rb then immediately, the controller will have special convention and now Story is a RESTful resource? Maybe the author used the word resource but didn't mention that it is RESTful but they are the sa...

ASP.NET - Url Rewriting vs. Routing

Hi, I am making a making a new asp.net web forms site and would like to beautify my urls - 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". Which option is best for this task - IIS7 Url Rewriting or Routing in terms of performance and ease of maintenance. Btw I ...

URL Routing and IIS6. How can I test it?

I can't seem to understand how I can find out what is erroring out when I implement URL Routing on IIS6 and Webforms. I continue to get 404 errors when I try to access a route. I add the ISAPI module as described here: http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/ SO that way ASP.Net handles all the r...

Routing vs Url Rewrite (IIS7) Performance

I was wondering is there any difference in terms of performance between the two approaches? Any good articles on this? ...

ASP.Net: HTTP 400 Bad Request error when trying to process http://localhost:5957/http://yahoo.com

I'm trying to create something similar to the diggbar : http://digg.com/http://cnn.com I'm using Visual Studio 2010 and Asp Development server. However, I can't get the ASP dev server to handle the request because it contains "http:" in the path. I've tried to create an HTTPModule to rewrite the URL in the BeginRequest , but the eve...

How can I encode Quotation marks without Asp.Net complaining?

On my site, an encoded quote (%22) in url path causes "Illegal characters in path" error I want specify search URLs like so: www.site.com/search/%22Vitamin+C%22 %22 is an encoded quotation mark " I'm using a Asp.Net URL Routing and the route is specified like this: "search/{searchTerm}" When Context["searchTerm"] is retrieved and De...

How do I allow users to map their domains to a url on my site?

How do I allow users to map their domains to a url on my site? (like how tumblr or blogger does) The app is being developed in Django. I want the users to be able to map their domains to mydomain.com/username (is this possible or do I need to have a format like username.mydomain.com?) Also my app runs on a VPS so I have my nameservers ...

How can you access RouteData from the code-behind?

When using ASP.Net routing, how can you get the RouteData from the code-behind? I know you can get it from the GetHttpHander method of the RouteHandler (you get handed the RequestContext), but can you get this from the code-behind? Is there anything like... RequestContext.Current.RouteData.Values["whatever"]; ...that you can access ...

How do I get HttpCompression (GZip) to work with URL Routing (Extensionless URLs) on IIS 6.

Okay, URL Routing is great. Extensionless URLS, SEO friendly etc. However, it seems that IIS 6 doesn't perform compression on sites that use Extensionless URLs. WildCard Mapping is on so Asp.Net can process the extensionless files, but is there any way to set these resources to be gzipped? ...

Zend url view helper - keeping existing params in a reversed route

At the moment in my ZF project have a URL structure like this: /news/index/news_page/1/blog_page/2 When I generate my pagination I use the URL helper as follows: <?php echo $this->url(array('blog_page'=>3)); ?> Which generates a URL like this: /news/index/news_page/1/blog_page/3 What I'd like to do is use a custom route to have ...

How to SEO friendly an existing ASP .NET 3.5 web application under IIS6

So, I know there's a lot of this subject here and over the Internet. But most articles/questions refers to "static" url rewriting, like: www.site.com/products.aspx?category=Books So they rewrite it to www.site.com/Products/Books That's ok but I need something else. The site is like a CMS, it has different types of content. Nowad...

Two mod-rewrite rules

...

Can two different URLs be routed to the same view in ASP.NET MVC?

I am just starting to learn ASP.NET MVC and I have a situation where I have two URLs which I would like to point to the same view. For example I could have http://some.domain/reports/daily/team1 and http://some.domain/team1/reports/daily. Could I then point them to the same view as the request is obviously the same? The reason I am ask...

Passing querystring Ids URL Routing using namespace system.web.Routing

I'm new to URL routing. Case 1: I can implement URL Routing for URL:/content/category.aspx mapped to /Reservation Case 2: I'm not quite sure how to handle the query string values. For example: URL:/content/category.aspx?SID=5&CID=191 I want this to map to: /Reservation Code written for Case 1: Global.asa Sub Application_Start(By...

ASP.NET MVC being hosted at DiscountAsp.Net and using a domain pointer

I host a website on DiscountASP.NET and they have any option of adding a domain pointer for a separate domain using your same hosting account. Thus if the original site is abc.com you can purchase a domain pointer to xyz.com and both initially point to the same root location. Using the root for abc.com is OK, but when xyz.com is the addr...

Is it impossible for routing existing url by using Asp.net Routing?

From my last question, I have been found that Asp.net Routing can't route with existing url for more info read this. How to redirect existing url to another url by using Asp.net Routing? Hint! I think, this behevior like access denied behevior that always redirect to default login page. Thanks, ...

PHP framework URL conventions

A lot of frameworks use URL conventions like /controller/action/{id} which is great, but if you need any configuration beyond that, it's up to you to write your own routes. How would you handle URLs like /users/{id}/friends on the backend? (to list all of a user's friends) I'm thinking that in the controller, something like this would ...

How do get clean URLs like Stackoverflow?

On some .NET driven sites URLs don't end with asp.net page names, like default.aspx, instead they use a pattern http://sitename.com or http://sitename.com/subdirectory/subdirectory. The site is mapped as sub directories off the root, ie. /tags, /users, /badges, the URLs would be /tags, /users, /badges respectively. StackOverflow, to use...

Webforms Routing ignore Elmah

I am having some trouble getting Elmah to work with url routing in an asp.net webforms application. Elmah is mapped to "elmah.aspx" and I have tried a couple of variations on: routes.Add(new Route("elmah.aspx", new StopRoutingHandler())); Is there a way I can ignore all .aspx pages? ...

Why doesn't URL routing work in Visual Studio?

Does anyone else have problems with running URL routing projects in Visual Studio? The Visual Studio Web server doesn't seem to want to play nice with URL routing. It doesn't invoke the engine at all in fact, which means you can't debug, and have to run the project out of IIS to get it work. Is there a workaround for this? Edit: By "...