url-routing

ASP.NET 4.0 routing + ajax + browser history

The problem with ASP.NET 4.0 routing is that the Page.RouteData.Values does not contain the paramenters after # character from the link System.Web.Routing.RouteTable.Routes.MapPageRoute("ProjectViewRoute1", "project/{title}/{idProject}#{idDesign}", "~/ProjectView.aspx"); As I said, the Page.RouteData.Values.ContainsKey("idDesign") w...

Routing WCF Traffic Based on URI Domain Requested

Is there a way to route traffic to a target WCF service file based on the URL domain requested? Basically, I have a single WCF RESTful services project with 3 service files offering different endpoints. It's hosted on a single IIS6 site looking for multiple host header values on port 80. I want to route traffic to different services fi...

URL Mapping prefix in Grails

Recently, I'm trying to migrating my application from CakePHP to Grails. So far it's been a smooth sailing, everything I can do with CakePHP, I can do it with much less code in Grails. However, I have one question : In CakePHP, there's an URL Prefix feature that enables you to give prefix to a certain action url, for example, if I have ...

How to convert model into url properly in asp.net MVC?

From the SEO standpoint it is nice to see urls in format which explains what is located on a page Let's have a look on such situation (it is just example) We need to display page about some product and decided to have such url template for that page: /product/{ProductId}/{ProductCategory}/{ProductUrlName}. And create for this purpose su...

UrlRewriting from ASP.NET WebApplication to ASP.NET MVC WebApplication

Hello, I have an ASP.NET Web Forms Application in migration process to ASP.NET MVC 1. Urls are as follows: hxxp://domain/Default.aspx (WebForms) hxxp://domain/mvc/Controller/Action (MVC) (hxxp because stackoverflow thinks they are links and prevents me from posting so many) "mvc" is another application inside my Web Site in IIS7. I ...

How to create a reusable Asp.Net Mvc application?

We have multiple Asp.Net WebSites each running on IIS. Site1 : http://www.Site1.com/ Site2 : http://www.Site2.com/ We have to implement Shopping Cart functionality for each of the above WebSites. For each web site the corresponding shopping cart should work on the following Url. Shopping Cart for Site1 : http://www.Site1.com/...

Apaches mod_rewrite VS. PHP routing?

Hi, for some days now I have been trying to make a simple mod_rewrite rule to create friendly URLs, my web host have mod_rewrite enabled but I just can't get it to work. All the next questions where posted by me: .htacces to create friendly URLs Friendly URLs with .htaccess .htacces NOT working… None of the answers worked, so I'm t...

asp.net mvc routing issue when run from within subfolder of web site root

The following works great when I run my app in the web site root. $("#randomQuote").load("<%: Url.Action("UpdateQuote", "Home") %>"); where Home is my controller and UpdateQuote my action However, when I run this as an application in a sub folder of my root web site, it doesn't. What am I missing? Here's my routing table: rou...

PHP routing for friendly URLs help

I am building a website that runs all of the code trough index.php. For example index.php?controller=something&id=01234. I want to use PHP to create friendly URLs, so I do this: $request = str_replace('/root/', '', $_SERVER['REQUEST_URI']); $params = explode('/', $request); $controllers = array('first_c', 'second_c', 'third_c'); if ...

How to detect language from URL in Sinatra

I have a multi-language website and I'm puting the language in the URL like domain.com/en/. When the user doesn't put the language in the URL I want to redirect him to the page in the main language like "domain.com/posts" to "domain.com/en/posts". Is there an easy way to do this with Sinatra? I have more than one hundred routes. So doin...

using file based URIs or not

Of course, the traditional method is to let the filesystem and your webserver work out the urls. E.G., www.example.com/index.html -> /var/www/public_html/index.html But I've noticed a trend in which, as opposed to letting the webserver do the mapping for you, you do it yourself (e.g., Rails and its routes config file, so /index is mappe...

Nested Masterpage problem with Page Class (HttpContext.Current.Handler) when using Page.GetRouteURL

So for Asp.net 4.0 they have the routing feature. For some reason, the GetRouteURL doesn't work in my nested masterpages. They work fine in my non-nested masterpages, and pages that don't have masterpages...so I'm thinking it's a nesting issue. Anyways, I couldn't find any info on it. Maybe there are similar problems with other Page cla...

ASP.NET WebForms -- Processing special query-string parameters across all pages on a site -- URL Rewriting, URL Routing, or other approaches?

Working on an ecommerce site which will be integrated with a 3rd party vendor--that vendor uses different identifiers for stores than we use internally (i.e. their store ABC123 is our 001-321). I'm researching the best approach to inspect incoming requests for reserved query-string parameters that indicate the request is using their ide...

web application url routing

I was just wondering if it was common for web applications (like frameworks or cms's) to handle ALL their own url routing/redirections? Say I had multiple sites and domains all pointing to a single file for processing url requests (WSGI). Urls are stored in a db and then based on the url, fetch the application to be served. Would this b...

username urls like twitter and facebook

how does twitter and facebook etc. make unique url eg. twitter.com/billgates if i would like to do the same (give my users unique urls with username), is it a application or do you crate a directory for each user with a index page?? by the way im using coldfusion. thanks ...

How to make Url.Action not to preserve route values?

I have an MVC 2.0 application where I have a list of items that can be browsed by their first letter and I have a tab on the master page for the whole list of items. What I would like is that the tab on the master page always should go to: /items And there are the letters of the abc that go to the items starting with the letter. So ...

Processing URL parameters - name value pairs separated by slashes

I want to have URLs like :- URL 1 - www.projectname/module/search/param/1 URL 2 - www.projectname/param/1/module/search I want a PHP code which takes the above URLs as parameter and returns an array like Array("module" => "search", "param" => 1) (for URL 1) Array("param" => 1, "module" => "search") (for URL 2) So that I can u...

Simulate file structure with PHP

I'm running PHP on a shared Apache web server. I can edit the .htaccess file. I'm trying to simulate a file file structure that is not actually there. For example, I would like for the URL: www.Stackoverflow.com/jimwiggly to actually display www.StackOverflow.com/index.php?name=jimwiggly I got halfway there by editing my .htaccess fi...

Mixed dynamic routes in Rails/Merb

Im trying to figure out the best way to map simple routes into one url. Application contains of 4 models: Location, Category, Budget, Company. But each model could be mapped to single url like this. For real-world example you can check out http://sortfolio.com/ /chicago <- Location /3k-5k <- Budget /bars <- Category /company-name <- Com...

asp.net 4 arbitrary url route

hi all u great experts! im now porting my website to .net 4. (webforms, not mvc) this website is designed to cater to many bookstores. i want each bookstore to be able to use the same site as www.SiteName.com/USAbooks or www.SiteName.com/CheapBooks or whatever the bookstores name might be. can i use the new routing feature for this? i do...