5
голосов
1ответов
509 просмотров

Dealing ASP.net Routes with n slashes using regex

I need to use a URL like this: http://mydomain.com/Box/Categ1/Categ2/Categ3/.../CategN/id1,id2,id3,...,idN Then I tried to create a new route this way... routes.MapRoute( "Box", "Box/{data}", new { controller = "Box", action = "Index"}, new { data = @"([a-zA-Z0-9-,]+/?)+" } ); ...

0
голосов
1ответов
1068 просмотров

Rails, Restful Routes, and Awesome Nested Set

I have a data structure that is basically a tree using :wesome nested set: class category acts_as_nested_set What I want to achieve are routes like /categories/1/children/ /categories/1/children/new I know I could fake it by making a separate controller, but it seems a bit non-DRY. Are t...

2
голосов
5ответов
4701 просмотров

ASP.NET MVC - Go to a different view without changing URL

is it possible to go to a different View without changing the URL? For example in my Index View, I have a link to go the the Details View but I would like to keep the URL the same. Thank you very much, Kenny.

1
голосов
3ответов
475 просмотров

Is there a way to filter unsupported formats in the routes file?

I have a Rails app that's getting hit by ScanAlert calling /login.php, but the app is throwing a 500. I'd like to filter any format that's not supported by my site, and 404 instead. My original inclination was to create a before_filter in application_controller.rb that removes any :format that's...

3
голосов
1ответов
2656 просмотров

asp.net mvc routes over https ssl

I have a website that uses Routes to do some URL rewriting. Note, I am not using MVC..just the Routes that make MVC famous :P Anyways the site works completely well...and all is well I enabled SSL on the entire site and accessing the site in https, I can get static files..I can access the aspx ...

14
голосов
3ответов
5285 просмотров

Changing a Rails route based on deployment type

Is there a good way of modifying a route based on the deployment type? Basically, I have a route that has a :requirements => {:protocol => "https"}, and I'd like that to only happen in production, but not in development.

7
голосов
5ответов
5835 просмотров

What package do i need to install for using routing sockets?

i am trying code given in Unix Network Programming by Richard Stevens. but i am not able to get the code to compile. here is the source code. http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15213-f00/unpv12e/libroute/ i don't have the header file net/if_dl.h and the net/route.h header file ...

2
голосов
2ответов
673 просмотров

Http Modules are called on every request when using mvc/routing module

I am developing a http module that hooks into the FormsAuthentication Module through the Authenticate event. While debugging i noticed that the module (and all other modules registered) gets hit every single time the client requests a resource (also when it requests images, stylesheets, javascri...

0
голосов
2ответов
361 просмотров

Ruby On Rails Routes Problem

I am have started learning Rails, it was going good until now. I am using HAML and have this on my index.haml = submit_to_remote "submit_btn", "Create", :url => {:controller => "queries", :action => "create"}, :method => "post" = submit_to_remote "exe_btn", "Execute", :url => {:...

0
голосов
2ответов
440 просмотров

Which method to use to set up a dynamic port mapper

I have a web app which relies on a number of back end services, and I would like to be able to dynamically switch between different instances of these services. So the thinking was to create an intermediate app which listens on some ports and redirects traffic as required. If I was dealing with...

0
голосов
3ответов
141 просмотров

URL routing, from domain.com/dir/ to otherDomain.com?

If I have a website at myFirstDomain.com/dir/, is it possible to get mySecondDomain.com to point to myFirstDomain.com/dir/ so that when users browse at the directed site, they only see mySecondDomain.com/potentialSubDirFromMyFirstDomain/ or how does it work?

3
голосов
3ответов
1402 просмотров

Hard coding routes in Rails

Let's say I have this: <%= link_to "My Big Link", page_path(:id => 4) %> And in my page.rb I want to show urls by their permalink so I use the standard: def to_param "#{id}-#{title.parameterize}" end Now when I click "My Big Link" it takes me to the correct page, but the url...

4
голосов
1ответов
262 просмотров

ASP.NET MVC One Way Route

Is it possible to define a route in the RouteCollection of Asp.net MVC, so that it just does the "URL rewriting" part and ignore the URL generation with Html.Actionlink(...)? In fact I want to add a keyword between controller and action (controller/..keyword.../action) for certain very special r...

0
голосов
1ответов
827 просмотров

RoutingError inside an iFrame

I scaffolded a test app and got a Routing error when I put an iFrame inside my view: This is the show template where I added the iFrame: views/bars/show.html.erb: <p> <b>Body:</b> <%=h @bar.body %> </p> <iframe src=“http://www.yahoo.com” style=“width:500px...

1
голосов
1ответов
421 просмотров

ASP.NET Routing using wrong route to generate URL; route values become query string parameters

Relevant route registration code: routes.MapRoute( "QuestionsMostRecent", "questions", new { controller = "questions", action = "most_recent" } ); routes.MapRoute( "ControllerActionFormat", "{controller}/{action}.{format}" ); Route generation code: Url.RouteUrl(new { controlle...

2
голосов
3ответов
1897 просмотров

I need a simple example of asp.net routing

if the user type http://myweb/mysite.aspx (file does not exist) I want them to go to http://myweb/site.aspx (file does exist) My goal is to make a bilingual website (including url) but without having to make physical file this would be one file http://myweb/acceuil.aspx http://myweb/home...

0
голосов
1ответов
704 просмотров

ASP.NET MVC routing fails when using default.aspx/controller/action style url

I'm deploying an ASP.NET MVC site to a IIS6 webserver, so I'm using a default.aspx/{controller}/{action} style routing strategy. However, for some reason it doesn't really work when using the default.aspx part. No matter the url, it always gets the default action (Index) on the default controlle...

0
голосов
2ответов
542 просмотров

ASP.NET MVC: action methods with one param not named ID and non-integer

Consider an ASP.NET MVC 1.0 project using the Areas convention as described on this Nov. 2008 Phil Haack blog post. This solution works great once it's set up! My trouble is starting thanks to my limited knowledge of ASP.NET MVC's routing rules. My intention is to create an action method and U...

3
голосов
2ответов
4543 просмотров

form_for tag for a resource with two different controllers and RESTful routing

I have a Rails app with a "Route" resource, and a "Route" controller (not to be confused w/ Rails routes). I've set it up so that the site admins (and only the admins) can manage the "Route" resource through the "Route" controller, while regular users manage their routes with a "Myroute" control...

0
голосов
3ответов
4658 просмотров

How do I fix default CakePHP routing on a "baked" MVC?

I just set up a database according to CakePHP's conventions, ran the "bake" scripts for models, controllers and views, and made sure the path was set up correctly. When I go to the following style of URL: http://BASEURL/app/controller_name I get the expected list view for that controller, bu...

0
голосов
3ответов
116 просмотров

Customizing map.resources in Rails

Suppose I have a Book model, which contains many Page models. The routing for this would be as so: map.resources :books do |book| book.resources :pages end Following the Rails default on this quickly leads to problems. Suppose Book #1 has 10 pages. The first Page in Book #2 will have this...

34
голосов
3ответов
9937 просмотров

Rails: How to modify tests for a nested resource?

While learning Rails I've created an application with a Domains controller nested below a Customers controller. I'm using Rails 2.3.4 and it's been a learning experience. I managed to get the below routing set up: customer_domains GET /customers/:customer_id/domains(.:format) {:c...

25
голосов
6ответов
23415 просмотров

Basic Rails 404 Error Page

I have been looking for a simple answer to this for a ridiculously long time and it seems like this has to be so plainly obvious and simple because no one has an easy, idiot proof tutorial. Anyway, all I want to do is to have a single 404.html static page that loads whenever ANY error is thrown....

4
голосов
2ответов
356 просмотров

ASP.NET MVC Routing

What would be the most appropriate route for this URL? www.mysite.com/searchkey0 www.mysite.com/searchkey1 Where searchkey is the keyword for a search method? I tried the following route: routes.MapRoute( _ "SearchRoute", _ "search", _ New With {.controller = "Search...

2
голосов
1ответов
1161 просмотров

Mass 301 redirects in ASP.NET, including pages that need to redirect to a different place depending on the query string parameters

We have several pages of our site indexed using old non-SEO friendly URLS such as http://www.domain.com/DocumentDetails.aspx?id=555. Recently we implemented routing that uses slugs stored in the database and looks up the slug to forward you to the right page using routing, for example: http://www...

4
голосов
1ответов
10110 просмотров

asp.net routing in webform - how get route data

i put this in Global.asax.cs routes.MapWebFormRoute("Page", "Page/{*anything}", "~/Page.aspx", false); how i can get value of {*anything} in Page.aspx i'm using WebFormRouting from codeplex

8
голосов
3ответов
18056 просмотров

How to define a custom path in rails?

I have a User model. If I do: def my_action @user = User.new end then <% form_for(@user) do |f| %> I get undefined method `users_path' for #<ActionView::Base:0x1b4b878> Which make sense because I haven't mapped it going map.resources :users... but I don't want to do it th...

0
голосов
3ответов
98 просмотров

Is it possible to run an ASP.NET project and an ASP.NET MVC project side-by-site on the same website?

I have an existing ASP.NET website with some custom routing, within a Solution that also contains Business Logic projects. I want to create a new project within the Solution, which is an ASP.NET MVC website. This website will also call the Business logic, and the ultimate aim is to port most of...

0
голосов
2ответов
125 просмотров

Asp.Net MVC routing diffrence in www.Mysite.com/Employee and www.Mysite.com/Employee/ while using JqGrid

I am using ASP.NEt MVC for one of my project. In this I have Employee controller which can be called by www.Mysite.com/Employee/ url. Also I have used JqGrid which uses followng to fetch data url: "GetGridData" While testing the same I found that If i type www.Mysite.com/Employee/ in b...

0
голосов
1ответов
176 просмотров

Ruby on Rails Actions help

I have my index page which posts a single entry instead of the usual scaffold default of all of the entries. I told it to link to an action and it just responds to "Couldn't find Post with ID=all". It is the same as the default index method and index view. I assume this has something to do with r...