routing

Zend Framework HTTPS URL

北城以北 提交于 2019-12-05 04:23:51
Is there any more or less standard way to specify a route that would create URL's with explicitly specified scheme? I've tried the solution specified here but it's not excellent for me for several reasons: It doesn't support base url request property. Actually rewrite router ignores it when URL scheme is specified explicitly. It's needed to specify separate static route for each scheme-dependent URL (it's not possible to chain module route with hostname route because of base url is ignored). It's needed to determine HTTP_HOST manually upon router initialization in bootstrap as long as request

CodeIgniter dynamic URI routing possible?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 04:07:12
问题 My application is designed to provide a single profile page for each user, with the 3rd segment being the user's ID. example.com/profile/page/1 Assuming user 1 is "Jon Jovi", using CI's routing I would like to generate this URI example.com/jon_jovi Is it possible to send this user's ID to config/routes.php , run a function to extract user 1's info from database and insert it like $route['profile/page/$row->id'] = $row->first_name . '_' . $row->last_name; Any thought or suggestions on how to

Rails no route matches with nested resources

家住魔仙堡 提交于 2019-12-05 03:59:10
I know this question comes up a lot with Rails, but I can't seem to get any of the previous answers to work for me. MyApplication::Application.routes.draw do resources :matters do resources :issues end I'm getting the following routing error: No route matches {:action=>"show", :controller=>"issues", :matter_id=>#<Matter id: 2, name: "Wilson", user_id: nil, created_at: "2011-03-23 18:19:40", updated_at: "2011-03-23 18:19:40">, :id=>nil} I am trying to get the path like this: <%= link_to issue.content, matter_issue_path(@matter, @issue) %> When I run rake routes it shows that I have the path:

Change URL without transition

烂漫一生 提交于 2019-12-05 03:51:58
I have a question concerning the Ember routing system. In my Ember-App, I have a simple leaflet fullscreen map. The center and zoom level of this map are coming from the URL query parameters. Now it would be nice to have a simple way to keep this query parameters in sync with the map position. So when somebody moves the map, I would like to change the url query parameters to the new values. When I use a simple transitionTo , I start a loop of changing the map and updating the query parameters changing the map again and so forth. So my first idea was to get the location implementation from the

Angular router url returns slash

北城以北 提交于 2019-12-05 03:47:05
I'm trying to get the current router path by using Router, but when i do console.log(this.router.url) it returns "/", although i'm on the "/login". But when i'm consoling the entire this.router object, there is the property url which has value "/login". here is my code from app.component.ts export class AppComponent implements OnInit{ constructor(private router: Router) {} ngOnInit(){ console.log(this.router); } } app.module.routing.ts import {NgModule} from '@angular/core'; import {PreloadAllModules, RouterModule, Routes} from '@angular/router'; import {NotFoundComponent} from './not-found

How to create routers in akka with parameterized actors?

拜拜、爱过 提交于 2019-12-05 03:01:17
I am trying to use a broadcast router in Scala, if I'm not mistaken it should look like this: val system = ActorSystem("My beautiful system") val workerRouter = system.actorOf(Props[Agent].withRouter(BroadcastRouter(individualDefinitions.size)), name = "agentRouter") That is what I understand from the tutorial I am following . The workerRouter acts as another actor and I can send messages to this router that will send them to all the Agents (as many as individualDefinitions I have). The problem is that I'd like to use the individual definitions to build the agents, they actually take some

Heroku cedar, Rails 3.1rc6, subdomain routing

纵然是瞬间 提交于 2019-12-05 02:50:22
问题 Locally, on Unicorn, my subdomain setup works fine. I've followed the heroku subdomain docs to the letter, and also the subdomains Railscast. subdomain.lvh.me:3000 points to the right place, and lvh.me:3000 points correctly to the root defined in routes.rb: root :to => "pages#home" However, in my new staging deployment on Heroku's Cedar stack, again using Unicorn, whilst subdomain.mydomain.co.uk points to the right place, mydomain.co.uk doesn't. Instead of going to pages#home as per the

Angular rc3 router - Navigating to same page with different parameters

China☆狼群 提交于 2019-12-05 02:25:25
I'm currently trying to navigate to the same page with different id values. So if i am on /test/1 and go to /test/2 the url in the browser updates but the view does not refresh. I debugged ngOnInit and it did not rerun when navigating to /test/2 . However if I go from test/1 to other the routing works fine, the issue only occurs when navigating to the same route with different parameters. Has anyone else come across this? When I get some time ill upload a plunkr. Angular 2 rc3 router 3.0.0-beta.2 RouterConfig = [ { path: '', component: 'Layout', children: [ { path: 'test/:id', component:

How to set baseUrl in Polymer Starter Kit?

谁都会走 提交于 2019-12-05 02:18:56
问题 How to set baseUrl in Polymer Starter Kit(light version)? (similar: Serving Polymer App to a /path not at root) I want to run it in subfolder (dl and unzipped PSK there, server is xampp): http://localhost/test/psk/app/ When I go to that URL, app is redirecting to: http://localhost/ with this note: Can't find: http://localhost/test/psk/app/#!/test/psk/app/. Redirected you to Home Page Ok There are no console errors, app work fine except the URL problem. Here are app.js : // Sets app default

ASP.NET MVC Html.BeginForm Problem

江枫思渺然 提交于 2019-12-05 02:13:16
I have a partial view: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DomainModel.Entities.Product>" %> <div class="item"> <h3><%= Model.Name %></h3> <%= Model.Description %> <% using (Html.BeginForm("AddToCart", "Cart")) { %> <%= Html.Hidden("ProductID") %> <%= Html.Hidden("returnUrl", ViewContext.HttpContext.Request.Url.PathAndQuery) %> <input type="submit" value="+ Add to cart" /> <% } %> <h4><%= Model.Price.ToString("c")%></h4> </div> And here is the html that gets rendered: <div class="item"> <h3>Kayak</h3> A boat for one person <form action="" method="post"> <input id