FAQ Database Discussion Community


PDF generation process cannot load images after adding security check (cookies not passing?)

php,pdf,laravel,routing,dompdf
I recently added a security check in my Routes.php file to ensure that only people who should be able to access images can access those images. It works as expected for user interaction, but now when I generate PDFs it seems that the process which gets the image is not...

How to specify module in namespace?

ruby-on-rails,module,routing,namespaces
I want to do something like: namespace :dashboard do get 'speed' get 'engine' get 'oil' get 'errors', :to => 'warn_system#errors', :module => false end Only errors link to another controller. dashboard_speed GET /dashboard/speed(.:format) dashboard#speed dashboard_oil GET /dashboard/oil(.:format) dashboard#oil dashboard_engine GET /dashboard/engine(.:format) dashboard#engine dashboard_errors GET /dashboard/errors(.:format) dashboard/warn_system#errors {:module=>false} For the last...

Why is Router used like normal function instead of constructor in express 4.x?

javascript,node.js,express,routing
I am newbie trying to understand Express 4.x routing and I am reading their guide at: http://expressjs.com/guide/routing.html In the last paragraph it says following: The express.Router class can be used to create modular mountable route handlers. A Router instance is a complete middleware and routing system and accompanying code is:...

Express-like routing for client-side Javascript

javascript,jquery,frameworks,routing
I am writing some Javascript and I need to add a routing system, otherwise it would be tricky to manage as the list grows. The Angular routing is good, but I don't want to add it as a dependency. What are the options? if(window.location.pathname==='/') { var $btn = $('<a />').html('btn').click(function()...

Trouble with understanding routing priority

java,playframework,routing
I am building some sort of discussion board, where you can ask questions and write answers. Now I ran into a problem with routing and seem to be understanding them wrong. I have a homepage called index, from there you can click a button "Ask question" or another button "Write...

Leaflet Routing Machine API - route with waypoint as start and end point

api,routing,leaflet
When adding a waypoint twice (as a starting point and as an end point of a route, the route is not displayed. How to change the code so that it works? L.Routing.control({ waypoints: [ L.latLng(lat1, long1), L.latLng(lat2, long2), L.latLng(lat1, long1, ], serviceUrl: 'http://router.project-osrm.org/viaroute', routeWhileDragging: false, addWaypoints: false, lineOptions: { styles:...

Zend Framework 2 routing error: resolves to invalid controller class or alias

zend-framework,routing,zend-framework2,zend-framework-mvc,zend-framework-routing
I'm trying to learn Zend Framework 2 and I have their skeleton application up and running. In order to access it I visit http://localhost:8080/. When visiting that link it displays their generic Zend page. What I want to be able to do is visit http://localhost:8080/application/test and have it bring me...

MVC routing with multiple parameter with different parameter name

c#,asp.net-mvc,asp.net-mvc-4,routing
In my home controller, I have 3 Action methods. which is give below. public ActionResult Index(int id) { return View(); } public ActionResult Index2(int did,int docType) { return View(); } public ActionResult Index3(int uid,int docId,int typeId) { return View(); } As I had given diffrent parameter name in each action...

Routing in Sinatra

ruby,web,routing,sinatra
I have an application where the user fills out a form at /search and I want that to output to /search/results. In my app.rb, I've attempted to call post '/search' do ... erb :search/results end However that fails. My directory structure is: views -search --results But it fails. Where am...

Why does my search in rails come back with a dot instead of a slash?

ruby-on-rails,routing
I have a search box at the top of my view as follows <%= form_tag clients_path(@client), :method => 'get' do %> <h2> Search for Workflows </h2> <p> <%= text_field_tag :search, params[:search] %> <%= submit_tag "Search", :name => nil %> </p> <% end %> This is calling my show controller def...

Implementing find node on torrent kademlia routing table

table,routing,bittorrent,dht,kademlia
I, already, reviewed a number of documents on this topic but there is something not exactly clear. For example bit torrent document (http://www.bittorrent.org/beps/bep_0005.html) states The routing table is subdivided into "buckets" that each cover a portion of the space. An empty table has one bucket with an ID space range...

How to map routes to controllers in Sinatra?

ruby,model-view-controller,routing,sinatra
I'd like to create a simple experimental MVC framework using Sinatra. I'd like to define resources by name "pages" for example should resolve to: /pages (index) /pages/new /pages/:id/show (show) as WELL as map to app/controllers/PagesController.rb with corresponding get('/') to be responsible for the index, post('/pages/create') be responsible for creation, etc....

ZF2 Segment Route doesn't match parent's constraint when using children

regex,routing,routes,zend-framework2,zend-route
I created the following routes: 'relatorios' => array( 'type' => 'Zend\Mvc\Router\Http\Segment', 'options' => array( 'route' => '/relatorios/:tipo', 'defaults' => array( 'controller' => 'Relatorios', 'action' => 'index', 'tipo' => 'normais', ), 'constraints' => array('tipo' => '(normais|administrativos)$', ), 'may_terminate' => true, 'child_routes' => array( 'view' => array( 'type' => 'Zend\Mvc\Router\Http\Segment', 'options' =>...

Where should I put Symfony third-party bundle's routing configuration?

php,symfony2,routing,symfony-routing
I have SonataAdminBundle, SonataUserBundle and LiipImagineBundle installed in my Symfony 2 application. According to their installation instruction, I put their routing configuration in /app/config/routing.yml. _liip_imagine: resource: "@LiipImagineBundle/Resources/config/routing.xml" admin: resource: "@SonataAdminBundle/Resources/config/routing/sonata_admin.xml" prefix: /admin _sonata_admin: resource: . type: sonata_admin prefix: /admin sonata_user: resource: '@SonataUserBundle/Resources/config/routing/admin_security.xml' prefix: /admin...

osmbonouspack : maneuverType for GoogleRoadManager RoadNodes?

android,google-maps-api-3,routing,osmdroid
I'm getting my routing from GoogleRoadManager but all maneuverTypes from RoadNodes are 0 so I can't set an appropriate icon for it. can anyone help with this one?

Multiple routes with multiple domains

symfony2,routing
Let's say I've got a website with multiple (sub)domains: acme.com (USA) acme.nl (Netherlands) be.acme.eu (Belgium) de.acme.eu (Germany) fr.acme.eu (France) etc... I thought this should be very simple to configure, so I made this routing.yml: usa: host: "acme.com" resource: "@WebsiteBundle/Controller/" type: annotation defaults: country: "en" netherlands: host: "acme.nl" resource: "@WebsiteBundle/Controller/" type:...

what is the different between ['ngRoute', 'ui.router']? [duplicate]

angularjs,routing,angular-ui-router
This question already has an answer here: Difference between angular-route and angular-ui-router 7 answers var faraWorkspaceApp = angular.module("FaraWorkspace", ['ngRoute', 'ui.router']); what is the different between ngRoute and ui.router in angularjs?...

Access a URL Parameter in a Route Prefix from Middleware

php,laravel,routing,laravel-5,laravel-request
I am struggling to access a route prefix parameter from my middleware. Given this URL: http://www.example.com/api/v1/campaign/40/status, and the following route: Route::group( [ 'prefix' => 'api/v1' ], function() { Route::group( [ 'prefix' => 'campaign/{campaign}', 'where' => [ 'campaign' => '[0-9]+' ], 'middleware' => [ 'inject_campaign' ] ], function() { Route::get( 'status',...

Open page url in modal on a page (Facebook Photo URLs)

javascript,jquery,angularjs,routing,angularjs-routing
P.S. I am using html5Mode to remove '#' in routing in below scenario Removing the hashtag from AngularJS urls (# symbol) Consider I have two main pages.One is photos where thumbnails are provided and whose url is /someSlug/photos. Other is the url of a single photo '/someSlug/photos/somePhotoId' which shows a...

MVC 5 Routing with parameter using @Url.RouteUrl

asp.net-mvc,routing,asp.net-mvc-5,asp.net-mvc-routing
I have an ActionResult that I have applied a routing attribute to: [Route("myproduct/{productID}", Name = "myproduct")] [MvcSiteMapNode(Title = "Products", ParentKey = "products", Key = "myproducts")] public ActionResult myproducts(int productID) ... I am trying to link to the view via a RouteUrl: <a href="@Url.RouteUrl("myproducts", @Model.myproducts[i].productID)">Buy</a> The resulting html does not even...

I don't understand routing

php,routing,flightphp
I am trying to learn a PHP framework. But I'm having some difficulties understanding some of the concepts of routing. I've chosen to use Flight. Their homepage shows: require 'flight/Flight.php'; Flight::route('/', function(){ echo 'hello world!'; }); Flight::start(); And I don't understand what they're using Flight::route... for. What am I missing?...

How to use routing and ng-view in AngularJS v1.3.3

javascript,angularjs,routing,ng-view
I'm trying to run this example about routing, which uses AngularJS v1.0.7. But I want to make it work using AngularJS v1.3.3 Everything in my example works but the ng-view part. So I'm not sure whether the problem is the ng-view or the routing itself. As the tutorial suggests, I...

Express Router with a sub-router

node.js,express,routing
Let's say parent module has a router with public requests using Parent Module app.get("/speakers",... app.get("/agenda",... etc. and another wild card route which actually delegates the request to child module to handle all of it's nested operations which parent module doesn't need to know or care about. app.all("/admin/*/*" //delegates task to...

WebApi Routing not working for Post

routing,asp.net-web-api2,asp.net-web-api-routing
My WebApiConfig has following routes // Web API routes config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { controller = "Employee", action = "Get", id = RouteParameter.Optional } ); The Post WebApi method has got following Signatures [HttpPost] public IHttpActionResult Post(Employee emp) { ..... } When i try to call...

how to simulate a traffic scenario for cars

routing,simulation,ibm-connections,city,traffic-simulation
im trying to do a project about routing cars through cities, the idea is to know the amount of cars that are on the streets so the vehicle can be routed through the less congested route. For that i would need to install a gps on every car of the...

How to deal with extra “/” in phpleague route?

php,web-services,routing
I am setting endpoints for my web application like this: $router = new League\Route\RouteCollection; function user_action (Request $request, Response $response) { // some logic . . . return $response; } $router->addRoute('GET', '/user', 'user_action'); /user endpoint works well. However when I use /user/ (extra slash in the end) I get a...

Re-transmission concept in TCP

tcp,routing,tcp-ip,osi
Server sent data to client, but client didn't send ACK for the data . So once RTT completed , Server will resend data to client again .... like that how long it will try to send the data ? What is the maximum time server will try to send the...

Static route for a subdomain in pimcore

php,zend-framework,routing,pimcore
I need to add a static route in pimcore that only takes effect for a special subdomain. So e.g. /de/json should snap for the URL api.example.org/de/json but not for www.example.org/de/json. Is this possible in pimcore? Or do I have to work with Zend Framework's Hostname? Thanks! ...

Re-routes using a method that should have nothing to do with it

ruby-on-rails,ruby,ruby-on-rails-4,routing
In a view I call upon a controller method. This however seems to call a different method than I want to do. The view includes: <%= link_to("Upgrade account", upgrade_path) With routes: get 'signup/organization' => 'organizations#new', as: 'register' get 'signup/register' => 'organizations#new_premium', as: 'register_premium' post 'signup/register' => 'organizations#checkout', as: 'signup_checkout' post...

Laravel 4 how get routes by group name

laravel,routing
In Laravel, I know I can get all routes using `Route::getRoutes() but I can't find if it is possible to get a list of all routes contained in a specified group. For example, i have this route file: Route::group(array('group_name' => 'pages'), function() { Route::any('/authentication', array('as' => 'authentication', 'uses' => '[email protected]'...

How to access UrlHelper.Action or similar from within Global asax

c#,routing,asp.net-mvc-5
I am trying to prepare a 301 redirect for a typo I made 'recieved' I am struggling to find a way of getting the url from the action and controller names. I am aware of UrlHelper.Action but it does not exist within Global.asax. How do I gain access to this...

How to rout back to domain/home to domain?

ruby-on-rails,redirect,routing
Here is my example: myApp::Application.routes.draw do get "main/home" match 'home/', to: 'main#home', via: :get root :to => 'main#home' What I need to is when the user types www.mywebsite.com/home redirect him back to www.mywebsite.com...

How to do load page in Angular JS?

javascript,angularjs,routing,angularjs-routing,angularjs-controller
How to load content on page by clicking on menu links? For example, there is menu: <a href="#">Personal</a> <a href="#">Contacts</a> Question is in how change template HTML in page for each link?...

Route parameter with slash “/” in URL

asp.net-web-api,routing,asp.net-web-api2,asp.net-web-api-routing,attributerouting
I know you can apply a wildcard in the route attribute to allow / such as date input for example: [Route("orders/{*orderdate}")] The problem with wildcard is only applicable to the last paramter in URI. How do I solve the issue if want to have the following URI: [Route("orders/{orderdate}/customers")] ? EDIT:...

django rest framework - using detail_route and detail_list

python,django,routing,django-rest-framework
In my code I have a viewset for the User. I want is to allow only Read operations (/users/42 and /users/) which the ReadOnlyModelViewSet does just fine. In addition, I want to have a /users/register URL that I can POST to in order to register a new User. class UserViewSet(viewsets.ReadOnlyModelViewSet):...

How to pass locale using FOSJsRoutingBundle

javascript,symfony2,routing,twig
I installed FOSJsRouting but my route need _locale parameter. How can I do that in JS ? Is there a way to get the locale in js ? in twig, I can do app.request.attributes.get('_locale') but in JS, I don't find any documentation. AJAX $.ajax({ type : 'get', url : Routing.generate('get_credits',...

How to keep scope within an XHR request?

javascript,routing,scope,xmlhttprequest
So I am building a Javascript router and building a route like this: route('/user/{name}', 'page', function() { this.text = 'User: ' + this.name; }); The scope of the function is the current route, so I can manipulate the current route here (this.text is what the view is looking for). Now...

Symfony/Twig how to render a Route set by anotation?

php,symfony2,routing,twig,url-routing
Let's say I have this code in a controller: <?php namespace Foo\BarBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration as Mvc; /** * @Mvc\Route("/foo/bar") */ class TestController extends Controller /** * @Mvc\Route("/test/{id}", requirements={"id" = "[0-9]{1,6}"}) * @Mvc\Template * * @return view */ public function testAction($id) { return array('test' => $id); } } How...

Akka messaging mechanisms by example

routing,akka,dispatcher,event-bus
I have a fair amount of Apache Camel (routing/mediation/orchestation engine; lightweight ESB) experience and am racking my brain trying to understand the difference between Akka: Dispatchers (Dispatcher, PinnedDispatcher, CallingThreadDispatcher) Routers Pools Groups Event Buses According to the docs: Dispatchers are: ...is what makes Akka Actors “tick”, it is the engine...

Symfony Controller magic method?

php,symfony2,routing,zikula
I am trying to use Symfony to replicate behavior in an existing Framework (zikula). This framework is extensible using modules which are basically extended symphony bundles. The old framework had urls like so index.php?module=foo&type=bar&func=zip which in symfony speak roughly translates to index.php?bundle=foo&controller=bar&method=zip The framework has an AbstractController which has a...

Is there any event like OnRouteChange in angular?

angularjs,routing
I want to run a function on each route changes in angular. Is there any event like OnRouteChange in angular?...

How does Iron-router determine route priority?

meteor,routing,iron-router
Let's say you have the following route definitions: @route "home1", path: "/:homeSlug1 and @route "home2", path: "/:homeSlug2 and @route "home3", path: "/fixedPath and then go to localhost:3000/fixedPath in the browser how does Iron-Router choose the priority? It does not appear that the fixedpath route takes precedence over the parameterized route....

$StateProvider Remove Child View Nesting

angularjs,routing,angular-ui-router,angularjs-ui-router
I am new to angular ui routing . I am creating a sample application and want to display parent and child view separately . I mean when parent item gets selected child view will be displayed and parent view would be hidden . If I add ui-view to parent view...

Allow Rails route params to be disordered

ruby-on-rails,routing
I have the following route: get "/marflar/:id(/colour/:colour)(/wheels/:wheels), to: "marflar#index" It matches the following urls: /marflar/123 /marflar/123/colour/red /marflar/123/wheels/4 /marflar/123/colour/red/wheels/4 But it forces me to put colour before wheels, i.e. the following does not work: /marflar/123/wheels/4/colour/red How can I stipulate that the order of the matched constraints does not matter?...

Change Rails namespaced route to personalized params route

ruby-on-rails,routing,rails-routing
TL;DR: I want to have username621/posts/title-of-post instead of member/posts/1 The changing of post id to post title was easy enough since I used the freindly_id gem to generate the slugs. However, I am having difficulty routing to a personalized params route instead of the current namespaced route. Here is the...

Codeigniter Select JSON, Insert JSON

json,codeigniter,select,insert,routing
I have very simple users database: user_id, user_name, user_email My model this: class Users extends CI_Model { private $table; private $table_fields; private $table_fields_join; function __construct() { parent::__construct(); $this->table = 'users'; $this->table_fields = array( $this->table.'.user_id', $this->table.'.user_name', $this->table.'.user_email' ); $this->table_fields_join = array(); } function select(){ $this->db->select(implode(', ', array_merge($this->table_fields, $this->table_fields_join)));...

Laravel multiple optional parameter not working [duplicate]

php,laravel,routing,laravel-5,laravel-routing
This question already has an answer here: Laravel 4 : How to pass multiple optional parameters 2 answers While using following route with 2 optional parameters, Route::get('/abc-{abc_id?}/xyz-{xyz_id?}', function($abc_id=0, $xyz_id=0) { return "\n hello ... World"; }); For requests /abc-1/xyz-15 - Hello World /abc-1/xyz - Hello World But for /abc-/xyz-15...

django rest framework - using viewsets

python,routing,views,django-rest-framework
I read about the viewsets in django, but haven't fully understood everything.. When using a viewset in django, for example - class SnippetViewSet(viewsets.ModelViewSet): """ This viewset automatically provides `list`, `create`, `retrieve`, `update` and `destroy` actions. Additionally we also provide an extra `highlight` action. """ queryset = Snippet.objects.all() serializer_class = SnippetSerializer...

SAPUI5/OPENUI5 - Routing with Dialogs

routing,dialog,sapui5,openui5
I´m currently stuck with the combination of routing and dialogs. I have a view with list elements and when I click on an element in the list I want the Detail view to be shown in a Dialog (Popup). The thing is, I also want the ID of the list...

Asp.net MVC Routelink null controller parameter

c#,asp.net,asp.net-mvc,asp.net-mvc-4,routing
I have two routes, the default one routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); I added another route, sometimes the parameter will by a string routes.MapRoute( name: "ByName", url: "{controller}/{action}/{name}", defaults: new { controller = "Home", action =...

How to block routing to a page in the public folder

node.js,routing,public-folders
I'm trying to design my NodeJS application, but there is something I am confused about. In my application, I plan to put all of the frontend material in the folder /public and then put the line app.use(express.static(__dirname + '/public')); in my app.js file. So with this in place, the user...

Pimcore multilanguage site static route

php,zend-framework,routing,pimcore
I've just recently started working with Pimcore in my work and I'm now on a project consisting of three languages each in their seperate tree. Today the sites URL is my-site.com/LANGUAGE/sub-page For example: my-site.com/se/about But what we would want to have is LANGUAGE.my-site.com/sub-page. For example: se.my-site.com/about I've tried using the...

How do I assign a custom ID to a dynamically generated URL with Iron Router in Meteor?

javascript,meteor,routing,iron-router
How do I have the URL of a dynamically generated post be one of the attributes assigned to it? Say it's name? So instead of events/vbMmmw6ymrWXjtXPd the URL is events/name-of-the-event Here's my routing so far: Router.route('/events/:_id', { name: 'event', data: function() { return Events.findOne(this.params._id);} }); And my schema: Events =...

ngRoute error, version conflict

javascript,angularjs,routing
Hello after trying to installing an angularjs component and updating all components via bower my routing does not work anymore. I guess it´s some kind of problem with the version of angular js and ngroute, but being new to angular js / bower I am not sure how to fix...

Simplify yaml routing rules for appengine (python)

google-app-engine,routing,app.yaml
I have 17 files in a images folder. I have created 17 rules for them, that I would like to simplify, i.e. make one rule that will work with regex or something else. Is there a way? - url: /favicon.ico static_files: images/favicon.ico upload: images/favicon.ico - url: /apple-touch-icon-57x57.png static_files: images/apple-touch-icon-57x57.png upload:...

Does Akka's BalancingPool dispatcher (BalancingDispatcher) have one thread per actor?

multithreading,routing,akka
BalancingDispatcher is now deprecated for assigning actors to directly but BalancingPool for routers uses BalancingDispatcher. As we don't configure the BalancingDispatcher directly, I'd like to know if the BalancingDispatcher is configured with threads equal to number of workers? If we're producing the BalancingPool in code instead of config, does this...

Send a post parameter with path

symfony2,post,routing
I have a list of demands, that I can remove some, so I have created a path for every demand like that: <a href="{{ path('etudiant_suprimer_demande',{'id':demande.id} )}} And I have a controller like that: class EdudiantController extends Controller { //codes public function suprimerdemandeAction($id){ // echo $id; $em = $this->getDoctrine() ->getEntityManager(); $demande...

Express selecting multiple model data

javascript,express,routing,mean-stack
I'm learning the MEAN stack and want to select multiple models when routing with express. I need to select one model then based on it's values a few others. Here's the main model: var mongoose = require('mongoose'); var MatchSchema = new mongoose.Schema({ title: String, type: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Game'...

How to direct web traffic via php throuh a specific interface?

php,curl,routing
How would I direct specific traffic to an interface? For example each interface is assigned a different ip-address, I would like to call http traffic via php to eth0 for some traffic and eth1 for other traffic. using using curl(using curl_init($url) )

How to get target of running transition in emberjs

javascript,ember.js,routing
How can I get current transition final target (route name) when transition is in progress. Consider following scenario: I have route route of resource resource. Transitioning to resource.route was executed. I would like to get target route name when resource model hook is executed....

No default route after returning from PPP connection

routing,archlinux,pppd
I'm here on a Arch Linux box with a working ETH0 (fixed IP) and PPP connection via 3G USB stick (ttyUSB0). After rebooting, ETH0 works fine. Establishing a PPP connection works fine, too. But after using 'poff' to cancel the PPP connection, I don't get a default route again. I...

Node forward path request to another server

node.js,express,routing,routes,request
Currently have a website running a node server that handles all requests for example.com and I created a completely separate wordpress blog on a separate server (running apache) that I would like served on a path like example.com/blog at 172.23.23.23 IP address. The wordpress server doesn't share any code or...

simple routing in yii framework 1

yii,routing
I am new to yii framework.I have a page controller and contact_us action then url become is site_url/page/contact_us but i want to it should be site_url/contact_us. i want to know how to set route for this and in which file. class PageController extends SiteController { function actionContact_us() { //something ;...

zend2 adding another controller to application

controller,routing,zend-framework2
I'm working on a ZendFramework2.4-project. I just got started an filled the IndexController of a standard skeleton application with some code and thought of another controller in the same application. No new modul, just a second Controller to keep code seperated. Of course I read the documentation at Zend2: Routing...

Why does this MVC action return a 404 response in IE11

ajax,asp.net-mvc,routing
I have written an mvc action that works in Chrome and Firefox but not in IE11. Using IE11 it returns a 404 response code. Controller: [HttpDelete] public ActionResult DeleteAction(int ActionID) { return Json(_Logic.DeleteAction(ActionID), JsonRequestBehavior.DenyGet); } Calling JS: Ajax_Proxy.DeleteAction = function (_actionID, successCallback, failureCallback) { return $.ajax({ type: "DELETE", datatype: 'json',...

Angular $routeProvider and Controller As Syntax

angularjs,routing,angularjs-scope,angularjs-routing,ngroute
Can anyone tell me if it is valid to use $routeProvider with Controller as syntax? I am having issues accessing <h1>{{kickController.foo}}</h1> from the controller where this.foo resides. angular.module('ucp.kick', ['ngRoute']).config(function($routeProvider, APP_BASE_URL) { return $routeProvider.when(APP_BASE_URL + 'kicks', { reloadOnSearch: false, navitem: true, name: 'Kicks', templateUrl: 'kick/partials/kick.html', controller: 'kick as KickController' }); });...

Angular ui-router : Links are not clickable

javascript,angularjs,routing,angular-ui-router,angular-ui
I try to run angular-ui-router to handle my views but i have a problem. The two links of the following view are not clickable. Angular change variable with link label but i can't click on. I have this view : <!DOCTYPE html> <html ng-app="MyApp"> <head> <meta charset="utf-8"> </head> <body> <h1>App</h1>...

Select Mongoose Model Based on Express Route

express,routing,mongoose
I think this might be a basic question, but looking for the best approach. I'm building an express app that should route to one of four different Mongoose models depending on the route. Something like this: app.get('/:trial', function(req, res){ var trial = req.params.trial; trial.find(function(err, records) { if (err) res.send(err); res.json(records);...

Linux - Route Specific Traffic Through Ethernet

linux,routing
At work we have 2 networks; a WiFi one for normal Internet access, and an internal LAN one, for the repo etc. I've recently started using Linux and it's a pain having to constantly switch between cable and WiFi. On Windows, we solved it (so that we can be connected...

forcing silex framework to generate https links

php,symfony2,https,routing,silex
My entire application should be accessed over HTTPS, The vhost is correctly configured and when I call any of my application pages with the HTTPS prefix, it responds correctly. However when I try to access a page through a generated link within my application. it always points to a regular...

Simple controller with Magento 1.8.0

php,magento,routing
I am newbie in Magento world, and I want to create simple controller like described here. But when I put into my browser I getting 404 error. I try to find solution in web but I didn't. Can somebody help me please? If you need some peace of code just...

Angular-UI-Router and IIS publishing

angularjs,iis,routing,angular-ui-router
I'm attempting to get Angular ui-route to work once deployed on IIS7 but even with URL rewrites setup in the web.config its still not working as perfectly as it does in IIS express. The 404 state is always intercepted by IIS and displays 404 - File or directory not found....

Best way of protecting the show() method against users accessing other users messages

laravel,laravel-4,routing,models,relationships
Ok, so I have a basic messaging system, I have a relationship set up so I can just call $user->messages to retrieve an array of the users inbox messages. I also have a very simple show method that currently only grabs the message with id passed to the show() function....

rails routing not going to controller as expected

ruby-on-rails,ruby,routing
I would like to get reviews for a specific user. I'm trying to hit var reviews_url = '/users/' + profile_id + '/reviews.json'; but it's not hitting reviews#index as seen in the logs Started GET "/users/23/reviews.json" for ::1 at 2015-05-03 10:50:01 -0700 Processing by ApplicationController#index as JSON What can I change...

Refactoring nested routes, how do I address this redirect_to?

ruby-on-rails,ruby,ruby-on-rails-3,routing,refactoring
I am working on an assignment for a project I have been working on. I was just introduced to refactoring my nested routes. Here are the changes. routes.rb resources :topics do resources :posts, except: [:index] do resources :comments, only: [:create, :destroy] end end to resources :topics do resources :posts, except:...

No action was found on the controller that matches the request

c#,asp.net,ajax,asp.net-mvc,routing
Sorry for the lame question. I've already read all similar questions and still can't resolve my issue. I'm getting 'No action was found on the controller that matches the request' error when calling from ajax: $.ajax({ url: '/api/ToyEdit/Post/', dataType: "json", type: "POST", contentType: 'application/json; charset=utf-8', data: JSON.stringify({toyId: 1, toy: 'asd'}),...

Rails routing link to specific show

ruby-on-rails-4,routing
This question seems a little basic, but considering I have 'pages#show' with a show page with url 'history'. How could I add this specific show page to a link: = link_to 'History', pages_path(@?????) PD1: I would prefer avoid using :id since I tend to seed a lot of data, and...

ActionController::UrlGenerationError in Home#home No route me atches {:action=>“edit”, :controller=>“users”, :id=>nil} missing required keys: [:id]

ruby-on-rails,routing,user,actioncontroller
I get the error: ActionController::UrlGenerationError in Home#home No route matches {:action=>"edit", :controller=>"users", :id=>nil} missing required keys: [:id] in my home controller. When I am sign in, I get errors in the home/home mostly about No route matches...:controller=>"users", :id=>nil} missing required keys: [:id]. For some reason, it looks like the sign_in...

Subdomain routing not working on Laravel 5 - WAMPServer

apache,.htaccess,laravel,routing,wamp
I am trying to implement static and dynamic subdomain routing in my application. It is not working as expected. I am using WAMPServer in my local machine. routes.php Route::get('/', '[email protected]'); Route::group(['domain' => 'api.letsplay.dev'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('users', function () { return "Success"; }); });...

Ruby-on-Rails Voting Partial Routing

ruby-on-rails,routing,voting
I have a voting feature on my app but can't route back to the same page with the vote applied. I know I have to fill in the link_to methods but my understanding of routing/ruby syntax is a bit limited, so I'm not even sure [post, vote] is correct. I...

Flask and React routing

python,flask,routing,reactjs
I'm building the Flask app with React, I ended up having a problem with routing. The backend is responsible to be an API, hence some routes look like: @app.route('/api/v1/do-something/', methods=["GET"]) def do_something(): return something() and the main route which leads to the React: @app.route('/') def index(): return render_template('index.html') I'm using...

WebAPI : 403 Forbidden after publish website

asp.net-web-api,routing,publish,http-status-code-403
Alright, I'm having a tough time locating the problem since it works locally but after doing a publish the results are simply: Error Code: 403 Forbidden. The server denied the specified Uniform Resource Locator (URL). Contact the server administrator. (12202) The code: [RoutePrefix("api/v1/project")] public class ProjectController : BaseApiController { [HttpGet]...

two lines with the same number of address destinnazione in ROUTING TABLE

table,networking,routing,ip
I am studing a particular case in routing table. As the title i have this table for a particular router in a net: destin.IP Mask NextHop Interface 193.14.5.160 255.255.255.0 ---.---.---.--- m0 193.14.5.192 255.255.255.0 ---.---.---.--- m1 111.0.0.0 255.0.0.0 ---.---.---.--- m0 192.16.7.0 255.255.255.0 111.15.17.32 m0 194.17.21.0 255.255.255.0 111.20.18.14 m0 194.17.21.16 255.255.255.0 111.20.18.14...

Angular not responding to any routes with ui-router - URL just disappears when I enter

angularjs,node.js,express,routing,angular-ui-router
I'm using NodeJS+Express to serve an HTML page with an Angular app. It seems to work fine when it loads. There are no errors. Problem is that that page is pretty much blank - except for the header. But the part that is supposed to go where <div ui-view></div> is,...

AngularJS - ignoring route

javascript,angularjs,laravel,routing
I'm trying to get Angular to ignore links if the route doesn't exist, and let http do the work. I have a large Laravel app, and I'm trying to implement AngularJS for some front end stuff. The problem I have, is I want to slowly add Angular code to each...

Keeping multicast messages on my machine

python,linux,sockets,routing
My code does the following: self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) self.sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 0) self.sock.sendto("hello", ('225.0.0.10', 1026)) I have an application running on my machine which I wish to test and which is accepting messages on port 1026. This application is correctly receiving my message. However, how do I ensure that...

AngularJS reinitialize controller

angularjs,routing,angular-ui-router,ionic-framework,ionic
I have got a controller named newGroupCtrl whose definition is like : .state('new_group', { url: '/new_group', templateUrl: 'templates/new_group.html', controller: 'newGroupCtrl' }) .controller('newGroupCtrl', function ($scope, $rootScope,$ionicHistory,$window) { $rootScope.roomId = $scope.getRoom(); $scope.getRoom = function () { var date = new Date; var minutes = date.getMinutes(); var hour = date.getHours(); return 'room_' +...

Rails route to get a resource using query string

ruby-on-rails,routing,url-routing
I would like to have a custom route querystring based, to access a specified resource. For example: /opportunities/rent/san-miguel-de-tucuman?id=45045 That route should map to the action OpportunitiesController#show, with the resource id 45045. Thanks in advance!!! Updated This are my current routes: get 'oportunidades/alquiler/san-miguel-de-tucuman/:id', to: "opportunities#show" get 'oportunidades/alquiler/san-miguel-de-tucuman', to: "opportunities#index" So, if...

Why Windows' tracert command maximum hops is limited to 255?

cmd,routing
When using the the -h flag of the 'tracert' command on Windows, I cannot go beyond 255. I wanted to know why is it limited to 255? Is a route of 256+ hops not possible or does 255 mean "unlimited"?

Restrict laravel to open url that is not in route

php,laravel,routing,laravel-5,laravel-5.1
I am Learning laravel now. Today I came across a problem that surprised me. I open this link in my browser: http://localhost/laravel/project/ch/resources/views/pages/blog.blade.php And I expect error 404. but it opens contains of this file. So, How to restrict laravel to do this. I want laravel to open only url mentioned...

SlimPHP and Routing - am I doing it wrong?

php,.htaccess,frameworks,routing
So I recently, as in a day or so ago, asked about why my routes were not working for slim and according to the answer, I made the appropriate changes, but unless I am doing routing wrong, they are not working. If we look at the routing file I have...

Yii2 route using yii\rest\UrlRule with several parameters

php,rest,yii,routing,yii2
I am trying to use Yii 2 routing for REST API. Following tutorial at http://www.yiiframework.com/doc-2.0/guide-rest-routing.html, I have already defined (with success) a lot of rule for API entry point like so : 'urlManager' => [ 'enablePrettyUrl' => true, 'enableStrictParsing' => true, 'showScriptName' => false, 'rules' => [ [ 'class' =>...

Change resources path

ruby-on-rails,ruby,routing
I'm using Rails 4 I have a routes.rb file that looks like: resources :books However, I'd like the urls in the application to end up looking like /b/101 instead of /books/101. I realize I could go through and rename each resource path individually, but is there not a way to...

How to add menus/ subtopics for meteor site?

javascript,node.js,meteor,routing,meteor-blaze
I am new to meteor. I followed the tutorials and successfully making simple interfaces like below. I tried finding examples to add menus/ subtopics like this which does not reload the page when clicked, but I couldn't find any examples. Could you please give me an example how to do...

Link does not pass on id correctly

ruby-on-rails,ruby,ruby-on-rails-4,routing
In a view I have included the link: <%= link_to("Upgrade account", upgrade_path(@organization)) %> This link exists on a standard 'show' view/page. So the visitor is already on for example http://localhost/organizations/123 with 123 being the @organization.id. So there is an @organization defined. In the controller I have: def upgrade @organization =...

Is it possible in laravel 5 to show a pretty url to the user, and a practical url to the app?

routing,routes,laravel-5,friendly-url,slug
I have this url: mywebsite.com/user/1/edit I want my users to see this: mywebsite.com/edit-your-profile/ Is this possible when using Route::resource('user', 'UserController');? If yes, how do I do it :) ? I still want my app to be able to see user/1/edit as I use it in my middleware to prevent unauthorized...

Why does a routing table on my Android device has two almost equal entries (different metrics)?

android,routing,ip
Please take a look at the screenshot. There are two entries for the destination network 192.168.1.0

Angularjs redirect to state using a url

javascript,angularjs,routing,angular-ui-router
Usually if I want to send a user to a specific state, I just do: $state.go('state_name'); $state.transitionTo('state_name'); And that will usually bring them to /state_name. However, I have a particular state that I am trying to send them to that has a variable in it like /state_name/:variable and I can't...

Dynamic loose source routing in IP networks

c++,visual-studio-2012,boost,routing,ip
Okay guys, I have this idea to recreate a program wich could find the best rout in IP networks. I found one guy on the internet who did it, and he shared some code..but whatever I'm doing with it, I can't make it work. I'm using Visual Studio 2012 with...

Angular $locationProvider html5Mode / error

javascript,angularjs,routing,html5-history,base-tag
So I'm running into a problem with Angular 1.3.15 and the $locationProvider. Every time I turn html5mode on I get a TypeError: Cannot read property 'replace' of undefined error. If I leave html5mode off, everything works fine. My directory structure is like so (4.DEV being a versioned directory name): public...