Questions tagged [custom-routes]
198 questions
1
vote
1 answer
Custom :public directory in Sinatra not working
So, I've got a sinatra app I'm working on with the app hosting several different microsites for clients. The way I have my public and views directory structured is like so:
sites/
site1/
public/
style.css
views/
layout.haml
…

zorz
- 75
- 8
1
vote
0 answers
Dynamically changing database while requesting on custom route file
I am struck into strange problem. My problem is I am trying to save data into another database which is quite easy only If I have register that request route in web.php file.
But If I register custom route file in RouteServiceProvider.php and the…

Usama Farooq
- 11
- 2
1
vote
2 answers
Named routes in Ruby on Rails for blog with /blog/:year/:month/:day
Seem to have a little issue with some routes i built into my site. I'm sure this was working, but it's been a little while since i worked on this site. Can't see why it's not working now. If someone could have a little peek for me it would be much…

Pete
- 1,472
- 2
- 15
- 32
1
vote
2 answers
Scala - passing defined values for optional parameters within routes file
So I have a routes file that calls a controller with several optional inputs. as per below
GET /1.0/*path/documents
controllers.DocumentController.list(path, format: Option[String], ref: Option[String], build: Option[String],…

crowgers
- 232
- 3
- 19
1
vote
1 answer
ASP.NET MVC 5 generates right url but executes wrong Action
I got a custom routes created for 2 different actions in same controller:
routes.MapRoute(
name: "editEquivPack",
url: "equivpacks/{id}/{ecommerceid}",
defaults: new { controller = "EquivPacks", action = "Edit" }
);
routes.MapRoute(
…

Mariano
- 13
- 3
1
vote
1 answer
DateTime custom Model Binder for database multilanguage routing
I have an application with a custom database routing:
routes.Add("RouteWeb", new RouteWeb());
public override RouteData GetRouteData(HttpContextBase httpContext)
{
if (httpContext.Request.IsAjaxRequest() || httpContext.Request.Url == null)…

John Mathison
- 904
- 1
- 11
- 36
1
vote
1 answer
pseudo-complex routes in rails 3
I'm trying to make some nice simple routes in Rails 3 with 2 custom matchers which assume the root :id will be a city and :city_id/:id will be a place... it seems to work fine except when trying to…

holden
- 13,471
- 22
- 98
- 160
1
vote
2 answers
RoR custom routing/Method/View problem all methods come back as undefined
I am playing with custom view and routes. I think that I have everything right but obviously not. Essentially I tried to copy the show method and show.html.erb but for some reason it will not work.
My controller
class fatherController <…

Jeff
- 13
- 4
1
vote
2 answers
Rails route for non-resource for csv
I have a method called "revisions", and I want to be able use the same logic but output to csv. I think I'd like to use the FasterCSV gem. What I need is to what to add to my routes in order to get a route for both the html and the csv outputs. …

Mr Mikkél
- 2,577
- 4
- 34
- 52
1
vote
1 answer
Laravel 5 - Define custom route method?
I just got an issue , i have 2 problems :
I want create a custom route for fast using without copy past code many time. Example Laravel 5 have default Route:resource (...) to make Restful! But i want to make my custom route function ,…

Shayne
- 65
- 2
- 11
1
vote
2 answers
How to make my routes more efficient?
By making rewrite directives in .htaccess file I write my custom directives.
class Route {
public $request_url;
public $url_args;
public $request_method;
function __construct() {
$this -> request_url =…

Harish Kommuri
- 2,825
- 1
- 22
- 28
1
vote
1 answer
ASP.NET MVC Routes: Conflicting action names with custom route
i all,
In a previous question, I asked how to define a custom route to handle the following URL:
http://www.example.com/User/Profile/Edit/{userProfileID}
I have a User object and a UserProfile object, but only a UserController that I want to be…

Matt
- 23,363
- 39
- 111
- 152
1
vote
1 answer
Redirecting to a custom route in MVC
I have setup a custom route in my MVC site. I am having trouble figuring out how to redirect to it though. Here is my custom route code:
public class MemberUrlConstraint : IRouteConstraint
{
public bool Match(HttpContextBase httpContext, Route…

Icemanind
- 47,519
- 50
- 171
- 296
1
vote
2 answers
Sitecore 8 MVC ajax call route register
I come with a problem caused by the poor sitecore documentation and my small experience.
The case:
I have a sitecore project which was not set up by me, but I had to develop over it. It's nothing complicated, few renderings - basic stuff
Issue:
I…

Alexandru Aliu
- 474
- 1
- 4
- 17
1
vote
1 answer
CSS problems with custom Router - PHP
I am creating a custom Router for my web app.
I use MVC.
When I, for example, type fab.app/portfolio all is good.
But when I type fab.app/portfolio/ the css, images, and js are not displayed.
This is because the paths change. In the first case the…

padawanTony
- 1,348
- 2
- 22
- 41