url-routing

Zend Framework Routing: .html extension

I know I've seen this done before but I can't find the information anywhere. I need to be able to route with .html extensions in the Zend Framework. I.E. /controller/action.html should route to the appropriate controller / action. We have an idea to throw away the .html extension with our .htaccess file but I think changing the route c...

asp-mvc routing when hosted in IIS on development environment.

Hi, i have the application on environment in IIS 5.1 under "localhost/mvcapplication1" The routing configuration is something like: routes.MapRoute("mvc-default", "{controller}.mvc/{action}/{id}" , new { controller = "Home", action = "Index", id = (string)null }); routes.MapRoute("Root", "" , new { controller...

$_GET and URL Rewriting for PHP

How does URL rewriting affect the $_GET parameter for PHP? Say, for instance, I have a URL like http://example.com/index.php?p=contact and I use $_GET['p'] to tell index.php to serve the contact page. If I use a rewrite rule that converts the URL to http://example.com/contact, will $_GET['p'] still work as expected? If it does, could you...

How do I specify a return url for a link to the login form?

Simple enough, it would seem, but it turns out not to be - mainly due to the fact that the View can't possibly know which way through Model and Controller you got there. Regardless, it is a problem that needs a solution: I have a login link, that takes the user to a form to enter username and password. When the user clicks "submit", I w...

ASP.NET MVC - MapRoute versus routes.Add (and 404s)

I'm just getting started with ASP.NET MVC. What is the difference between MapRoute and routes.Add ? Should I just be using MapRoute? Can I map multiple routes? Which "maps" take precedence... those you called first or last? I'd like to be able to do something similiar to the StackOverflow does for users. But I would like the URL to fit...

How to format an external URL in Symfony?

I'm finding the documentation very difficult to understand regarding the symphony routing system and I need a bit of help with this. I would like to format my external URL to look like the following... mySite/module/illinois/chicago/ Via a form the user can search by city, state, or city and state. I think the routing rule would be s...

URL routing and relative links in Tomcat 5.5

I'm trying to add URL routing to a web application running in Tomcat 5.5. I want to make the dynamic page URLs more friendly, changing main.jsp?type=test&group=info to main/test/info as is all the rage. I have set up the following in the web.xml <servlet> <servlet-name>main</servlet-name> <jsp-file>/main.jsp</jsp-file> </s...

Url of Return View in ASP.NET MVC

In the context of this question link text is possible from a Controller that responds to a Form Post to go to the Friendly Url? ...

URLs for e-mailing in ASP.NET MVC

How would I generate a proper URL for an MVC application to be included in an e-mail? This is for my registration system which is separate from my controller/action. Basically, I want to send an email verification to fire an Action on a Controller. I don't want to hardcode the URL in, I would want something like the Url property on the...

Asp.Net MVC Url.RouteUrl Problem on Windows 2003 vs. Visual Studio 2008

I'm seeing a difference in the output from Url.RouteUrl between my development machine and my deployment server. I'm running Visual Studio 2008 and my deployment box is Windows 2003 Server. I have configured the Global.asax.cs to run with the .aspx extension in my routing tables. However, when I use the "Search-Basic" named route, there ...

ComponentNotRegisteredException Probs - ASP.NET MVC

Hi All, I recently upgraded a project I am working on to RC1 and I am absolute pulling my hair out. I am using AbsoluteRouting and I keep getting the following issue which is preventing me from upgrading. I have know cllue about whether you have any ideas but I thought I would see if you did (really appreciate any help you can provide :...

ASP.NET MVC URLs in a JSON request

Warning: The question refers to the RC version of ASP.net MVC. Problem is solved in ASP.net MVC 1.0 I have a page that requests some JSON from an Action on my controller and then fills a table with that data. In my JSON reponse, I'm including an anon object that contains some fields. One of those fields is a URL to another control...

ASP.NET webpages without names ? ala stackoverflow?

Mentioned stackoverflow only as an example, but if you look above the URL for ask is http://stackoverflow.com/questions/ask which means /ask is a subdirectory, but they also do this for the specific question pages. How do you code this in .NET? Not a code question as much as a technique. I know this is great for SEO, but how do yo...

How to handle stackoverflow's question urls in an asp.net mvc controller?

I would like to know how to set up the routing in asp.net mvc so I can have similar urls to stackoverflows question urls? http://stackoverflow.com/questions/115634/do-you-believe-that-asp-net-mvc-is-ready-for-production/ I am guessing that for url creation there is a helper class that creates the question urls. The part i am wonder...

How do you handle a variable number of MVC routes?

I note this intriguing bit in ASP.NET MVC: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); I'd like to map {*pathInfo} into a route. Something like: routes.MapRoute( "area/{*pathInfo}", "{controller}/{action}/{id}",parameters new { controller = "Area", action = "Index", id = ??? } ); but how do I pass in the variable "f...

Pass website URL into the Route in ASP.NET MVC

I am working on a project that needs to grab the actual URL and use it in the route itself. Everything I am seeing, reading and testing allows the route to grab the items after the site URL. This is what I have tried and each time it simply say the site is blank (which is probably because of the default of blank). Can you throw me any...

Web Routing for IIS6 and II7 Classic Mode? *NOT* MVC

According to the msdn.microsoft.com site, .NET 3.5 Routing should work under IIS6 and II7 in classic mode. I've made the mods to the web.config file and tested under IIS7 integrated mode and it's working great. I'd love to keep IIS7 Integrated, but my webhost is still just IIS6 (with .net 3.5). So... has anyone gotten this to work? I...

Retrieving Values from URL Rerouting on the target page?

Ok... got URL Routing working just fine, but cannot figure out how to actually read the values in the target page. One example here shows using the RouteValue object from the RequestContext. Now all of these are in the System.Web.Routing namespace, but everyone seems to be connecting these to MVC only. Where does the RequestContext co...

Web Routing Best Practices for Naming urls NOT MVC

Working on routing my site and am wondering what a good standard is for naming regular pages? I was going to name them like: /Daily-Winners But I want to reserve the - multiword syntax for titles of threads, blog posts, etc., not for regular traffic pages. Is there a standard or guideline to make this more attractive for SEO? Espec...

Can I make ASP.NET MVC Html.RouteLink() return a url for my home page without an ID?

I've got a single route in my Global.asax.vb page like this... Shared Sub RegisterRoutes(ByVal routes As RouteCollection) routes.IgnoreRoute("{resource}.axd/{*pathInfo}") routes.MapRoute( _ "IdOnly", _ "{id}", _ New With {.controller = "Page", _ .action = "Details", _ ...