-
Amal Antony
javascript node.js angularjs express url-routing
I have routing code of the following nature in Express : app.get(“/profile/:param”, function (req, res) This is coinciding with the path routing provided by AngularJS. For instance, when an Angular view of the nature /profile/someparam#view1 is loaded,the new URL pattern is picked up by Express, which assumes it to be of the type /profile/<someparam>. This is causing the controller associated with view1 to be called infinitely thereby crashing the page. How do I get around this problem?
-
John Saunders
c# asp.net url-routing asp.net-4.0 friendly-url
I am using friendly-url’s with value end of the url, instead of using queryString.Like www.mysite.com/pages/content/value and in content.aspx page, I handle value with this code.protected void Page_Load(object sender, EventArgs e) {if (Request.GetFriendlyUrlSegments().Count > 0){string value = Request.GetFriendlyUrlSegments()[0];} }The problem is here for any page under root, code works perfect. But when I try to do same for any sub page which is in like “Pages” folder. Page_Load event fires
-
hexygen
web-hosting url-routing chrome
My domain is registered with Google through enom hosting services. When I change my record type to “URL Frame” it stops working on Chrome.Instead of loading the site, a blank tab will be opened. If I go to another window and back I will see the previous application (i.e. screen is not refreshing inside the tab). Chrome doesn’t crash, so I can still move to other tabs or change the url, but the page is not loading.It works completely fine on Firefox and IE, and it doesn’t seem to matter which url
-
asif-007
asp.net url-routing dotnetnuke dotnetnuke-7
We are trying to implement Custom URL routing through Global.asax, for our custom built module. but we are getting a 404 file not found error.Here is the Global.asax code:<%@ Application Inherits=”DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication” Language=”C#” %> <%@ Import Namespace=”System.Web.Routing” %> <%@ Import Namespace=”System.Web.Compilation” %><script runat=”server”>public class CategoryRouteHandler : IRouteHandler{public IHttpHandler GetHttpHandler(Req
-
Paul Zhou
javascript asp.net-mvc-3 url-routing
I have a situation that I need to jump urls in javascript of a ASP.NET MVC site.As we know, we can generate url with @Url.RouteUrl(“RouteName”, new { params}) in xx.cshtml. Now I want to generate url in the same way in javascript, is it possible?I have tried:window.location.href =’@Url.RouteUrl(“RouteName”, new {param1=”‘ + param+ ‘”}) %>’.However, it doesn’t work.My Route:routes.MapRoute(“ListOfTicketAB”,”piao/{citystart}-{cityend}”,new { controller = “Tickets”, action = “ListS2S”, traintype =
-
Abhishek Ranjan
asp.net c#-4.0 .net-4.0 url-routing
I have written in my content page protected void Page_Init(object sender, EventArgs e){try{Page.Title = “Bollywood Movie-” + Page.RouteData.Values[“MovieName”].ToString();int movieid = int.Parse(Page.RouteData.Values[“MovieId”].ToString());}catch (Exception ex){Response.RedirectToRoute(“ErrorPage”);}}but after going into catch it doesn’t redirect to error page but it goes to page_load then page_load of master then it shows error of Server Error in ‘/’ Application.Input string was not in a correc
-
Josh
symfony2 routing url-routing symfony-2.2
I used composer.phar to install Symfony 2.2.1 standard edition, and then I used the app/console utility to generate a “ClientBundle”.I’m trying to define my routes using the @Route annotation. Here’s my controller:namespace ScrumBoard\ClientBundle\Controller;use Symfony\Bundle\FrameworkBundle\Controller\Controller;class DefaultController extends Controller {/*** @Route(“/my/route/path”)*/public function indexAction($name){return $this->render(‘ScrumBoardClientBundle:Default:index.html.twig’,
-
14 revsDouglas
namespaces url-routing ruby-on-rails-3.2
Many people talk about namespace as a way to change the URL that lead to their controller with a prefix (i.e. : /admin/movies instead of /movies)Changing the URL pathThe official doc explains that if we want to change the URL that lead to our controller with a prefix, we just have to change our resource in config/route.rb.From this :resources :moviesto this :resources :movies, :path => “/admin/movies”Implementing namespaceAfter a lot of googsearches, I’m wondering why so many people like to h
-
tacos_tacos_tacos
php url-routing yii
I currently have a rule that allows for querying a couple different models according to name, brandId, and ingredients. This rule works, except when I try to pass in an empty value for any of the optional parameters. I thought that I used the correct RegEx but apparently not. I’ve tried both:array(‘ws/service/query’, ‘pattern’=>’ws/service/query/<model:\w+>/(<name:\w+>)?/(<brand:\d+>)?/(<ingredients:.+>)?’, ‘verb’=>’GET’),andarray(‘ws/service/query’, ‘pattern’=>’
-
KJF
ruby-on-rails ruby-on-rails-3 routing routes url-routing
In the rails 2 version of my app I have this resource definedmap.resources :albums, :as => ‘music’, :has_many => :reviewsThis gave me some standard routes:album GET /music/:id(.:format) {:controller=>”albums”, :action=>”show”} new_album GET /music/new(.:format) {:controller=>”albums”, :action=>”new”}I also have a polymorphic association set up as follows:class Album < ActiveRecord::Basehas_many :reviews, :as => :reviewable endclass Review < ActiveRecord::Basebelo
-
Gaurav
node.js express url-routing
Homework: I know few things about url handling in node.jsapp.param(‘id’, /^\d+$/); app.get(‘/user/:id’, function(req, res){res.send(‘user ‘ + req.params.id); });Will only accept /user/1, /user/2 …i.e. with id as integer onlyapp.get(‘/:type(discussion|page)/:id’, …) will only accept type with value of discussion or pageapp.param(‘range’, /^(\d+)\-(\d+)?$/); app.get(‘/range/range=:range’, function(req, res){ var range = req.params.range;res.send(‘from ‘ + range[1] + ‘ to ‘ + range[2]); });wil
-
Leniel Macaferi
asp.net-mvc routing url-routing decorator
In the StackOverflow Podcast #54, Jeff mentions they register their URL routes in the StackOverflow codebase via an attribute above the method that handles the route. Sounds like a good concept (with the caveat that Phil Haack brought up regarding route priorities).Could someone provide some sample to make this happen?Also, any “best practices” for using this style of routing?
-
Nathan Long
ruby-on-rails ruby-on-rails-3 url-routing engine rails-routing
I have a Rails 3 application with several engines containing additional functionality. Each engine is a separate service that customers can purchase access to.I am, however, having a problem with routes from the engines that aren’t readily available to the controllers and views.controller:class ClassroomsController < ApplicationController..respond_to :htmldef indexrespond_with(@classrooms = @company.classrooms.all)enddef newrespond_with(@classroom = @company.classrooms.build)end.. endapp/view
-
pkozlowski.opensource
dynamic configuration url-routing angularjs deferred
I have configured some basic routes that are available for all users before they log in:App.config(function ($routeProvider) {$routeProvider.when(‘/login’, { templateUrl: ‘views/login.html’, controller: PageStartCtrl.Controller }).otherwise({ redirectTo: ‘/login’ }); });So the only thing user can do is to log in. After the user logs in, I would like to register additional routes like this:$http.post(‘api/Users/Login’, { User: userName, Password: userPassword }).success(function (response : any
-
guest
ruby-on-rails-3.1 resources routes url-routing match
I have the following in my routes:resource :login, only: [:new, :create, :destroy]resources :users, only: [:new, :create] doresources :notesendbut I would like to have url ‘my-domain/login’ instead of ‘my-domain/login/new’ and ‘my-domain/register’ instead of ‘my-domain/users/new’.How can I do than? I have tried the following but it didn’t work:match ‘login’ => ‘login#new’match ‘register’ => ‘users#new’resource :login, only: [:create, :destroy]resources :users, only: [:create] doresources :
-
vish
iis7 url-routing asp.net-3.5 windows-server-2008-r2
I uses asp.net 3.5 for buiding my application, I use URL routing in it and it works fine in my local host In my web.config file i do the following setting<system.web><httpModules><add name=”ScriptModule” type=”System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35″/><add name=”RoutingModule” type=”System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, Publi
-
Aaron Vanderwielen
c# asp.net url-routing
I’m working on a real estate website and using URL Routing so my client can have their featured properties show their address in the URL: www.realestatewebsite.com/featured/123-Fake-StHowever, I’m new to URL Routing and I think I took a poor shortcut. I would have originally liked to use the primary key of my database to access the properties (propID) but didn’t want to have to pass it into the URL, so instead used the address to get the propID and use it from there. However, if I attempt to ass
-
Pravin Mane
url extjs url-routing extjs-mvc extjs4.2
I am working in ExtJs4.I am getting stuck at a point where I have to change my url like E://demoProj/index.html to E://demoProj/index.html#firstpage or E://demoProj/index.html#secondpage based on per page(view) in extjs4.I trid a lot but not yet solved it.How can I solve this problem? Please give me some guideline. Thanks in advance.
-
teresko
php ubuntu apache2 kohana url-routing
I’ve started to learn kohana fews days ago and with my Zend Framework my learning experience seems to be fast until i run into couple of issues. First of all i started the project in windows 7(dual booting with linux ubuntu 12.04). i know every link was fine before i started adding more pages to an admin app with kendo ui. i’ve added couple of routes to handle controllers in subfolders and to handle url with query string of the form ?bla=dkll&second=lkdjf (used by kendo grid to send unknow
-
Morgan Delaney
codeigniter url-routing
I’m trying to achieve:I am using CodeIgniter.I am trying to access http://localhost/mywebsite/uploads/. The directory exists, and via a 3rd party upload script, I can successfully write to that directory. However, when going straight to the URL (or referencing its files in an src attribute), it gives me a 404 error.I thought the best way to do this was to:Make sure my $config[‘base_url’] was set to http://localhost/mywebsite/.(For an unknown reason, I can access /mywebsite/js/ but not /mywebsite
-
tbicr
url-routing flask multilanguage custom-error-pages
I have one server with flask application instance and have several domain which mapped to this server by DNS.My site must support several languages by host and prefix:mysite.com – english mysite.com/fr – franch mysite.ru – russian mysite.ru/by – belarusian localhost or other unknown host without language prefix – default language (english)I implemented it with double route registration /endpoint and /<lang>/endpoint and reloaded url_for function and it work, but now I must implement custom
-
Leo Selig
angularjs dependency-injection url-routing directive
I am currently trying to get in touch with AngularJS. Since I plan to build a rather complex web application I searched for an alternative to the ngView/$routeProvider combination to be found in the ng docs as I find them quite dissatisfying for a complex application with several navigation levels. So what I tried is to write a custom directive called ngRoute that could be used like this:<div ng-route=”users”><div ng-route=”:id”></div><div ng-route></div><!– def
-
Brandon Linton
asp.net-mvc url-routing elmah
I’m brand new to ELMAH but I’ve been working with MVC for a little while now. After reading several blogs on the subject I’m pursuing the road of having an ErrorController that handles 404 and unknown-error pages, and making a default route that forwards all unknown paths to the 404 action on that controller.The problem is that ELMAH logs every error twice; the detail logs are completely identical except for their identification number specified in brackets in the title.Has anyone else run into