url-routing

Clean url for SEO in Codeigniter

How to remove the controller/method for cleaner URL in codeIgniter. The original url is below www.mydomain.com/controllers/method/variable and I want my url look like this www.mydomain.com/variable or www.mydomain.com/friendly-url-description/5 where 5 is key or id of the table, and the friendly-url-description is description o...

URL Routing,,,,I need a workaround

Hi,i found something that is not smart done in the URL routing of .net 4.0 and i need a workaround to make it works my scenario is the following,,i call this method on the application start event handler in global.asax void RegisterRoutes(System.Web.Routing.RouteCollection routes) { routes.MapPageRoute("ViewEntities","{CompanyU...

ASP.NET MVC Routing / SEO Friendly URL

I'm trying to do something like stackoverflow Take a link from stackoverflow for example: http://stackoverflow.com/questions/9033/hidden-features-of-c if you remove the last part (http://stackoverflow.com/questions/9033) it still returns the same result. For my routing in Global.asax I tried doing something like "{action}/{id}/{titl...

special characters in url give "Bad Request" or "Illegal characters in path"

I'm using javascript to request a image generated by the server in real time. The parameter is passed in the url and grabbed by MVC, and set in the "id" parameter to the controller. Like this: Public Function Index(ByVal id As String) As ActionResult This works fine if i dont use any special characters, like "?" or quotes. To send t...

How can I override a .svc file in my routing table?

I have this URL that was used from some JSON post back from the main website: http://site/Services/api.svc/UpdateItem We are in the process of updating the web site slowly to ASP.Net MVC 2 and don't want to break any current URL's in the system. (JavaScript refresh issues) I have deleted the /Services/api.svc and have moved the logic...

Ruby on Rails 3 routing error

Am working my way thru Ruby on Rails Tutorial: Learn Rails by Example and am on this page: http://railstutorial.org/chapters/static-pages#top Am getting problems when I create an HTML page in the public directory which is called public/hello.html and should appear as in Figure 3.3. My problem is that when I try to create the page an...

Rails or Django style routing in Perl

I have grown accustomed to the way Rails maps a route or the Django uses regex on a route (I am not expect in Django, but this is what I have heard how it does it's routing) and how they use the style of permalinks to access a particle web page. Is it possible to do the same thing in Perl? ...

How to resolve url from query into route

I'm trying to find a way get the symfony 1.4 to render the page: /detail/id/1 when url called is: /?url=/detail/id/1 Any ideas? Been googling around but so far haven't found the solution for it. Any ideas? I know it could be done with rewrites but i hoped i can do it through routing.yml somehow. ...

CodeIgniter ajax post

function new_review(){ $.post('restaurant_profile/get_dg_new_restaurant_review', {}, function callback(response) { alert(response); } } Hi I have a function that does an jQuery ajax post to a controller function. The function outputs a simple string using the PHP echo function. The function works fine if I don't ha...

ASP.NET MVC Routes Mapping issue

Hi guys, I am struggling with generating outbound urls in asp.net mvc 2. Here is the scenario. Controller: MoveController Action: Index() View: Index.aspx Now what I would like is to have multiple urls mapping to same controller (MoveController) and action (Index) with different parameter (locationId) value e.g. url -> Rout...

ASP.NET 3.5 webforms URL Routing question

Hello, I'm attempting to configure URL routing in my ASP.NET 3.5 WebForms app. Setting up routes has always been confusing to me, so I was hoping I could get some direction. My requirement is fairly simple. I'm setting up different "brands" of my application, and I'd like the brand to be specified in the URL. For example, http://www....

Custom URLs in Rails of the form custom.site.com

I would like to have my users specify custom URL paths such that those paths are placed in front of my site's name, i.e. if I have a site called www.orion.com, I'd like a user to be able to create his own little home page at johnny.orion.com. I have successfully managed to implement orion.com/johnny, which works implemented by adding ma...

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...

Extend Url Route to apply Url Encoding for each parameter

Hi guys, I am facing a problem that one of my fields need to be shown in the url contains special character (/, \, :). The stupid way to handle this generate action links by using UrlEncode(). Then UrlDecode is used before consuming in controller. But I think it really stupid because too many places need to be adapted. So, my problem ...

mvc.net routing: routevalues in maproutes

Hello everyone, i need urls like /controller/verb/noun/id and my action methods would be verb+noun. for example i want /home/edit/team/3 to hit the action method public ActionResult editteam(int id){} i have following route in my global.asax file. routes.MapRoute( "test", "{controller}.mvc/{verb}/{noun}/...

Zend Router precendece problem

Hi, I have got two routes ; category route resources.router.routes.category.type = "Zend_Controller_Router_Route" resources.router.routes.category.route = "shopping/:idTwo/:id/*" resources.router.routes.category.defaults.module = "default" resources.router.routes.category.defaults.controller = "shopping" resources.router.routes.category...

Can't figure out why my images will not display on this site

On this site: http://church.allthingswebdesign.com/ None of my images are displaying anymore. They used to, but i'm not sure why they don't anymore. Not sure if it's something i've changed or what. I'm 100% positive the images exist in the folder images because i've checked the remote copy of the files to make sure i can preview them ...

Asp.net Routing - Route constraints and empty Route

I have a url that I want to map routing to: http://siteurl.com/member/edit.aspx?tab=tabvalue where tabvalue is one of: "personal", "professional", "values" or nothing. I want to map it to a route like: Member/Edit/{tab} But my problem is - I don't know how to specify such constraints. I'm trying this regex: ^[personal|professiona...

Redirecting an old URL to a new one with Flask micro-framework

Hi, I'm making a new website to replace a current one, using Flask micro-framework (based on Werkzeug) which uses Python (2.6 in my case). The core functionality and many pages are the same. However by using Flask many of the previous URLs are different to the old ones. I need a way to somehow store the each of the old URLs and the ne...

How to correctly canonicalize a URL in an ASP.NET MVC application?

I'm trying to find a good general purpose way to canonicalize urls in an ASP.NET MVC 2 application. Here's what I've come up with so far: // Using an authorization filter because it is executed earlier than other filters public class CanonicalizeAttribute : AuthorizeAttribute { public bool ForceLowerCase { get;set; } public Can...