routing

Orchard CMS- Configure Base URL

扶醉桌前 提交于 2020-01-04 02:47:08
问题 I installed the latest version of Orchard on my dev machine using a base url of localhost/frankgiotto. Then I moved the site to www.frankgiotto.com and updated my Base URL in the settings. Site works perfectly. I love everything about it but the one thing is that all the links on every page are mapping to www.frankgiotto.com/frankgiotto/etc and I want simply www.frankgiotto.com/etc This is driving me insane at the moment.. help anyone!? p.s.. Yes, I made absolutely sure that Base Url is set

Rails 4 Blog /:year/:month/:title with clean routing

白昼怎懂夜的黑 提交于 2020-01-03 17:20:33
问题 In Rails 4 is there another cleaner way to achieve routes, such as: /blog/2014/8/blog-post-title /blog/2014/8 /blog/2014 /blog/2014/8/tags/tag-1,tag-2/page/4 /blog/new OR /blog_posts/new I've tried the following using FriendlyId (as well as acts-as-taggable for tag param and kaminari for page param): blog_post.rb extend FriendlyId friendly_id :slug_candidates, use: [:slugged, :finders] def to_param "#{year}/#{month}/#{title.parameterize}" end def slug_candidates [ :title, [:title, :month,

Strongly typed actionlink with asp.net mvc beta?

久未见 提交于 2020-01-03 13:36:07
问题 I used to be able to do the following in Preview 3 <%=Html.BuildUrlFromExpression<AController>(c => c.AnAction(par1, par2)%> How am I supposed to create urls in a strongly typed way with the MVC Beta? The only thing so far I have found is <%= Html.ActionLink("aName", "ActionName", "ControllerName")%> This is not strongly typed off course. 回答1: You need the ASP.NET MVC Beta Futures, which is a separate download ASP.NET MVC Beta Futures then your original code will work as before. See this post

Use ip route add to add multicast routes to multiple devices

两盒软妹~` 提交于 2020-01-03 13:34:21
问题 TLDR: Is there a way to use "ip route" to add multicast routes for multiple NICs? We have software that joins two sockets bound to different ip addresses on separate NICS to two separate multicast groups, eg socket 1 is bound to 192.168.0.2 and joined to multicast group 233.255.10.1 while socket 2 is bound to 10.57.31.2 and joined to multicast group 239.255.100.1. We are currently using a bash script (Linux kernel 3.14.39) to set multicast routes on the two network interfaces using route, eg

Angular 2 : defining a Router on another Component than the bootstraped one

南楼画角 提交于 2020-01-03 11:47:22
问题 I'm still working on a project using Angular2. If you want more details about why I need to do what I'm going to explain, please refer this issue. I have an AppComponent which is bootstraped via bootstrap . It's a very simple component : @Component({ selector: 'app-view', directives: [ Devtools, MainComponent ], template: ` <ngrx-devtools></ngrx-devtools> <main-cmp></main-cmp> ` }) export class AppComponent { } This component includes another one : MainComponent (via the main-cmp selector).

laravel route with parameter not coming from url

好久不见. 提交于 2020-01-03 06:39:06
问题 I have multiple routes that look like this: Route::get('pending-submit', 'CasesController@cases'); Route::get('submited', 'CasesController@cases'); Route::get('closed', 'CasesController@cases'); I have been looking around even in the router API documentation and I can't find a solution for my requirement other than creating multiple methods within the controller. The method does the exact same query except for adding a where clause to identify the different status between each case, what I

ASP.net MVC Routing Throws Exceptions as Normal Behavour?

旧时模样 提交于 2020-01-03 05:19:12
问题 I was debugging my current project (ASP.net MVC 1.0 project) and stumbled upon slightly disturbing behavour. It seems that when the router is hunting for a referenced partial view aka <%Html.RenderPartial("AccountListControl", ViewData["AccountList"]); %> It cycles through it's default locations until it finds the correct spot. So it checks "Views\Shared\AccountListControl" and checks "Views\Home\AccountListControl" etc Once it finds a match - all is good. Bad locations are identified by the

rails rspec No route matches [duplicate]

给你一囗甜甜゛ 提交于 2020-01-03 05:10:08
问题 This question already has answers here : No route found in rspec test for an existing route (3 answers) Closed 4 years ago . I'm trying to test my routes (they work fine for real requests) and get this error: ActionController::UrlGenerationError: No route matches {:action=>"api/login", :controller=>"login", :email=>"a@a.com", :password=>"super_secure"} I've looked at a bunch of similar questions but could not find a precise answer for my problem. My route is: Rails.application.routes.draw do

In page link reloads page

吃可爱长大的小学妹 提交于 2020-01-03 04:32:09
问题 I'm building my first Angular 2 app and I've come quite far now with a nice Webpack build system, routing, services and components in place. I tried adding a normal in page link ( [href^="#"] ) in one of my components, and as long as I'm on the home page ( / ) it works fine, but whenever I'm on a different URL the whole app reloads to the home page. Apparently this is a known issue (https://github.com/angular/angular/issues/6595) but I need this to work right now so I'm hoping someone can

CakePHP 2.x Custom Route with Arguments

一世执手 提交于 2020-01-03 04:17:05
问题 In my CakePHP App I'd like to pass arguments in a custom route. What works now (domain/controller/action/param) domain.com/dealers/view/1 What I'd like to do (domain/param/controller/action/param) domain.com/washington/dealers/view/1 This is my code in routes.php: Router::connect('/:city/dealers/view/:id', array('controller' => 'dealers', 'action' => 'view'), array( 'pass' => array('city', 'id') ), array('city' => '[a-z]+') ); This just redirects domain.com/washington/dealers/view/1 to domain