url-routing

MVC Advanced Routing

I am attempting to route a URL that does not have a static action i.e. Users can create systems which can be represented by any string. I would like to have a URL like the following: http://yousite.com/System/WIN1234/Configure By default the routing mechanism thinks that WIN1234 is the action, whereas I would like to be able to catch...

Rails will_paginate routing caching duplicate pages

I use the will_paginate plug-in. In oder to generate routes that I can cache ( /posts/index/2 instead of /posts?page=2) I added the following to my routes.rb: map.connect '/posts/index/1', :controller => 'redirect', :url => '/posts/' map.connect 'posts/index/:page', :controller => 'posts', :action => 'index', ...

Python Selector (URL routing library), experience/opinions?

Does anyone have opinions about or experience with Python Selector? It looks great, but I'm a bit put off by its "Alpha" status on pypi and lack of unit tests. I mostly like that its simple, self contained, and pure WSGI. All other url routers I've found assume I'm using django, or pylons, or paste, or pull in lots of other dependenci...

best url for heirarchical data crud operations

I have 4 one-to-many relationships in a row so that each entity essentially has a parent entity. What is the best way to do this. Heres what i have so far? for the entities - Items -> Gallery -> Image -> Image Properties The url for items is easy item/list for the gallery though it could be item/gallery/1 for the gallery list o...

URL Structure Parent to Child Relationship With Static Files

Currently I can not show site structure in the url IE www.site.com/parent-page/child-page without creating a subdirectory at the root. Is there an easy way to dynamically create the parent to child relationship other than creating subdirectories? ...

Is it OK to send a 301 redirect with an action filter?

I'm writing a new asp.net mvc application and I've been toying with the idea of allowing my user to post short, concise urls to content that he has posted. Those short url's will be handy in cramped spaces like Twitter and comment areas. I like this idea as I'm not a huge fan of url shorteners because they're so vague and you're never re...

How to handle all URLs from 1 page using PHP?

I would like to redirect all urls from the webpage (what ever what's after the domain name) to a single webpage that will analyse the complete url and will show the good page and information. I know it's possible with Mod_Rewrite and using some PHP function to get the URL but I can't find any good webpage showing the steps and how to do ...

Rails route globbing vs. escaping?

Hi. I'm trying do something like this: map.goto '/g/*extra', :controller => 'goto', :action => :show Where extra is a path component, e.g.: redirect_to goto_url( employee_path(employee) ) What I get is: http:://www.example.com/g/%2Femployee%2F123 What I want is: http:://www.example.com/g/employee/123 So my question is: altho...

ASP.NET PageMethods and The HTTP verb POST used to access path is not allowed

So, I'm using URL routing with WebForms. I run locally through the Visual Studio web server, and everything is hunky-dory. I deploy locally to IIS (XP, so it's IIS5), and therefore I need to make sure that I have my app wildcard mapped so the URL routing is handled properly. However, doing this makes all my PageMethods fail with this me...

Double slash in resources

I get a application running over: Rails 2.3.5, Application is set 2.1.0 at enviroment.rb Ruby: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0] The Urls are generated right, but the resources like stylesheets, javascripts are generated with double slashes. <link href="http://127.0.0.1:3000//stylesheets/style.css?1254514155" medi...

Rails custom routes question

I have an aplication that has an User and a Project model. I have the following relationships between those 2 models: USER has_many :authorships , :foreign_key => :author_id has_many :moderatorships, :foreign_key => :moderator_id has_many :authored_projects, :through => :authorships, :class_name => 'Project' has_many :moderated_projects...

True SEO urls in asp.net mvc 2

I'm building a simple cms system and would like to have true seo urls with hierarchical levels of pages like http://www.mydomain.com/lorem-ipsum/dolar/sit-amet/. Whats the best approach to successfully implement urls like this? ...

Dynamic url routes ASP MVC

Im trying to make a very simple application that lets my client create their own pages. The hard part is to let them create thir own URL. Client need to fill in: Page name (ex. About us). Page description (ex. We are a big company). Page URL relative (ex. /About) When client enter this information and save, it should be saved in the...

Getting full URL of action in ASP.NET MVC

Is there a built-in way of getting the full URL of an action? I am looking for something like GetFullUrl("Action", "Controller") that would return something like http://www.fred.com/Controller/Action. The reason I am looking for this is to avoid hardcoding URLs in automated emails that are generated so that the URLs can always be gener...

ASP.NET MVC Default URL View

I'm trying to set the Default URL of my MVC application to a view within an area of my application. The area is called "Common", the controller "Home" and the view "Index". I've tried setting the defaultUrl in the forms section of web.config to "~/Common/Home/Index" with no success. I've also tried mapping a new route in global.asax, ...

Can I put a + sign in a folder with IIS?

I'm pretty sure this can't be done, but I'm looking for a hack or way to put a + in a folder name, like http://www.mysite.com/cats+dogs/Default.aspx I'm using IIS 7, and have tried creating a virtual directory to achieve this, and it didn't work. I am not allowed to put %2B in the explorer folder or virtual folder name. Any ideas how...

How to add localization in the URL using the Zend Router

I have a Zend Framework site that setups all routes in a file, routes.ini. The routes look like this: routes.popular.route = popular/:type/:page/:sortOrder routes.popular.defaults.controller = popular routes.popular.defaults.action = index routes.popular.defaults.type = images routes.popular.defaults.sortOrder = alltime routes.popular.d...

PHP Application guarantee no re-post

Hi All, I might not have known what to search for to get this answer so please point me to the correct post if this has been dealt with already. Now then, I have a little custom CMS and I want to ensure users don't re-submit their $_POST data by refreshing the page. So I've done something like this: <? //Start a session to hold v...

Routing Problem With Symfony

So I have a module that displays articles. And I tried to make an action that displayed all article of a certain publication when that publication was clicked. I tried following the way to do this on the symfony jobeet tutorials but I ran into some new headaches. Since publications and authors can sometime be url unfriendly, I want to us...

How should I convert this long and complex PHP style URL query string to a Django url?

I'm converting a small PHP application to Django. One section has a long query string, indicating how a widget is to be displayed. There are a few required parameters and several optional ones. The current urls read like: app.php?id=102030&size=large&auto=0&bw=1&extra=1 The id and size are required, but auto, bw and extra are option...