Search Results

Search found 20409 results on 817 pages for 'url routing'.

Page 21/817 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Modify links in CListView pager to follow routing

    - by Thorpe Obazee
    I currently have this: <?php $this->widget('zii.widgets.CListView', array( 'dataProvider'=>$model, 'itemView'=>'_view', 'template' => '{items}{pager}' )); ?> The Pager shows me paginations to posts/index?page=2, posts/index?page=3. The problem is that I have routed blog/posts to posts. I am on blog/posts now and all the links in the Pager is showing me posts/index?page=2, page/index?page=3. I want to have the pager showing links to blog/posts/index?page=2, blog/posts/index?page=3 This my current routing for this: 'urlFormat'=>'path', 'rules'=>array( 'blog/posts' => 'posts', How should I do this? Update: For those confused as to what I am saying:

    Read the article

  • ASP.NET MVC 2 Areas, Strange routing behavior

    - by user137348
    I've created an Area named "Admin". I've created also a controller(Pages) and a view(List) in this areas. When I run my app and enter the url "/Admin/Pages/List" I'm getting an The resource cannot be found error. When I enter /Pages/List, the Action method is hit but the view is not found,because the app is searching in wrong directories ~/Views/Pages/List.aspx ~/Views/Pages/List.ascx ~/Views/Shared/List.aspx ~/Views/Shared/List.ascx the view is in /Admin/Pages/List. My routing conf for Admin area: public class AdminAreaRegistration : AreaRegistration { public override string AreaName { get { return "Admin"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Admin_default", "Admin/{controller}/{action}/{id}", new { controller= "Pages",action = "Index", id = "" } ); } }

    Read the article

  • routing difficulty

    - by user281180
    Part of my application maps resources stored in a number of locations onto web URLs like this: http://servername/Issue.aspx/Details?issueID=1504/productId=2345 Is it possible to construct an MVC route that matches this so that I get the path in its entirety passed into my controller? Either as a single string or possibly as an params style array of strings. In my Global.aspx I have routes.MapRoute( "Issue", "Issue/{Details}", new { controller = "Issue", action = "Details" }, new { issueId = @"\d+", productId = @"\d+" } ); I have tried the code RouteValueDictionary parameters = new RouteValueDictionary { {"Controller", "Issue"},{ "action", "Details" }, { "issueId", Test.ID }, {"productId", Test.Project.ID} }; VirtualPathData vpd = RouteTable.Routes.GetVirtualPath(null, parameters); var test = vpd.VirtualPath; test value is /Issue.aspx/Details?issueId=1504&productId=3625. How to generate URLs Using ASP.NET Routing and sends it to users and they should be able to open the page by clicking on the generated link. However, here the servername isn`t included. How can I have the servername with the the link as http://servername/Issue.aspx/Details?issueID=1504/productId=2345

    Read the article

  • How to go about designing an intermediate routing filter program to accept input and forward accordingly?

    - by phileaton
    My predicament: I designed an app, written in Python, to read my mail and check for messages that contain a certain digital signature. It opens these and looks for keywords. If the message contains these keywords, certain related functions area executed on the computer. It is a way I can control my computer from my cell phone without being there. I am still in the beginning stages and it can only currently remotely open and close applications/processes. The obvious issue is security risks. I hoped to spearhead that by requiring and checking for that digital signature. However, my issue comes when I'd like to make this program usable by multiple users. The idea is that the user will send keywords: username and password, for instance, to log into their personal email account and send messages to it to be parsed. Please ignore the security implications of sending non-encoded passwords through email. (Though if you could help me on that part I'd much appreciate it as well, but currently, that is not the scope of my question.) My issue is designing an intermediary process that will take an email/password to read an email and scan for those keywords. The issue is, that the program has to be accessing an email to read the email for the username/password! I have got myself into a loop and cannot figure out how to have this required intermediary program. I could just create an arbitrary email account and have that check for login-creds, but is there a better way of doing this than that? Also, is there a better way of communicating with a computer remotely than this? Especially if the computer is not a server and is behind a router with only a subnet ip? If I am asking this question in the wrong place, I deeply apologize. Any help would be much appreciated!

    Read the article

  • ASP.NET MVC Custom Routing Long Custom Route not Clicking in my Head

    - by percent20
    I have spent several hours today reading up on doing Custom Routing in ASP.NET MVC. I can understand how to do any type of custom route if it expands from or is similar/smaller than the Default Route. However, I am trying figure out how to do a route similar to: /Language/{id}/Question/{id}/ And what I would like, too, is similar to how SO works. Something like: /Language/{id}/Arabic/Question/{ID}/Some-Question-Title Where "Arabic" and "Some-Question-Title" can be almost anything because what really matters is the ID's Am I going beyond what can be done with the extended URL past the language ID?

    Read the article

  • Inconsistent Routing Results in MVC

    - by HapiDjus
    Seems I'm still missing something to the MVC routing concept. I have a route that follows nearly the same pattern as another route in an area but for what ever reason I get a 404 every time I attempt to run it. I've tried to use Phil Haack's Route Tester DLL and according to that it hits the correct route (matched route comes out to common/itemhistory/{contentid}). When I try to run it for real, it blows up. I'm trying to map a call to a JsonResult by passing a Guid. I've had success with other routes working fine (common is an area in my site). What could I be doing wrong? context.MapRoute( "ItemHistory", "common/itemhistory/{contentid}", new { controller = "common", action = "GetItemHistory" }, new { contentid = @"^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$" } ); context.MapRoute( "Common_default", "common/{action}", new { controller="common", action = "Index" } );

    Read the article

  • [Python] Detect destination of shortened, or "tiny" url

    - by conradlee
    I have just scraped a bunch of Google Buzz data, and I want to know which Buzz posts reference the same news articles. The problem is that many of the links in these posts have been modified by URL shorteners, so it could be the case that many distinct shortened URLs actually all point to the same news article. Given that I have millions of posts, what is the most efficient way (preferably in python) for me to detect whether a url is a shortened URL (from any of the many URL shortening services, or at least the largest) Find the "destination" of the shortened url, i.e., the long, original version of the shortened URL. Does anyone know if the URL shorteners impose strict request rate limits? If I keep this down to 100/second (all coming form the same IP address), do you think I'll run into trouble?

    Read the article

  • ASP.Net URL rewriting and redirecting....

    - by DDiVita
    I am trying to wrap my head around a URL rewrtie / redirect project I need to work on. We currently have this url: www.domain.com/Details/Detail.aspx?param1=8&param2=12345 Here is what the rewritten URL will look like: www.domain.com/Param1/8/Param2/12345 I am using the ISAPI_Rewrite filter to allow for the "nice" url and make the page think it is still using the old url. That works fine. Now, I need to redirect users, if they use the old URL, to the new URL. I fgiure I would need to use a combination of the filter and an HTTPModule / Handler to perfomr the redirect. Any ideas?

    Read the article

  • Generate canonical / real URL based on base.href or location

    - by blueyed
    Is there a method/function to get the canonical / transformed URL, respecting any base.href setting of the page? I can get the base URL via (in jQuery) using $("base").attr("href") and I could use string methods to parse the URL meant to being made relative to this, but $("base").attr("href") has no host, path etc attributes (like window.location has) manually putting this together is rather tedious E.g., given a base.href of "http://example.com/foo/" and a relative URL "/bar.js", the result should be: "http://example.com/bar.js" If base.href is not present, the URL should be made relative to window.location. This should handle non-existing base.href (using location as base in this case). Is there a standard method available for this already? (I'm looking for this, since jQuery.getScript fails when using a relative URL like "/foo.js" and BASE tag is being used (FF3.6 makes an OPTIONS request, and nginx cannot handle this). When using the full URL (base.href.host + "/foo.js", it works).)

    Read the article

  • Transforming url with URI-module

    - by sid_com
    Do I gain something when I transform my $url like this: $url = URI-new( $url )? #!/usr/bin/env perl use warnings; use strict; use 5.012; use URI; use XML::LibXML; my $url = 'http://stackoverflow.com/'; $url = URI->new( $url ); my $doc = XML::LibXML->load_html( location => $url, recover => 2 ); my @nodes = $doc->getElementsByTagName( 'a' ); say scalar @nodes;

    Read the article

  • ASP.Net URL rewirting and redirecting....

    - by DDiVita
    I am trying to wrap my head around a URL rewrtie / redirect project I need to work on. We currently have this url: www.domain.com/Details/Detail.aspx?param1=8&param2=12345 Here is what the rewritten URL will look like: www.domain.com/Param1/8/Param2/12345 I am using the ISAPI_Rewrite filter to allow for the "nice" url and make the page think it is still using the old url. That works fine. Now, I need to redirect users, if they use the old URL, to the new URL. I fgiure I would need to use a combination of the filter and an HTTPModule / Handler to perfomr the redirect. Any ideas?

    Read the article

  • Domain name rewriting and URL rewriting in the meantime in .htaccess

    - by Steven
    Ugly URLs: www.domainname.com/en/piece/piece.php?piece_id=1 www.domainname.com/en/piece/piece.php?piece_id=2 www.domainname.com/en/piece/piece.php?piece_id=3 ... Friendly URLs: piece.domainname.com/en/1 piece.domainname.com/en/2 piece.domainname.com/en/3 ... I want to present website users only friendly URLs. When I apply RewriteEngine On RewriteRule ^en/([^/]*)$ /en/piece/piece.php?piece_id=$1 [L] only the URL is rewrote.Besides the CSS file can not be found in web page of the friendly URL. How to rewrite the domain name and the URL in the meantime? Do I have to use RedirectMatch, if so, how to do it?

    Read the article

  • Domain name rewriting and URL rewriting in the meantime in .htaccess

    - by Steven
    Ugly URLs: www.domainname.com/en/piece/piece.php?piece_id=1 www.domainname.com/en/piece/piece.php?piece_id=2 www.domainname.com/en/piece/piece.php?piece_id=3 ... Friendly URLs: piece.domainname.com/en/1 piece.domainname.com/en/2 piece.domainname.com/en/3 ... When I apply RewriteEngine On RewriteRule ^en/([^/]*)$ /en/piece/piece.php?piece_id=$1 [L] only the URL is rewrote.Besides the CSS file can not be found in web page of the friendly URL. How to rewrite the domain name and the URL in the meantime? Do I have to use RedirectMatch, if so, how to do it?

    Read the article

  • Can I use Zoneedit to do URL rewrite?

    - by chilly-child
    This is our scenario: Our DNS is hosted by a company. They don't manage the DNS. We use Zoneedit (www.zoneedit.com) to manage the DNS such as nameservers, CNAMEs, etc... Then we have our web host where we just have our files hosted. We have a subdomain created on zoneedit. We would like to do a URL rewrite so that subdomain.ourdomain.com is displayed as www.ourdomain.com/subdomain. Do I use Zoneedit to do the URL rewrite or the web host or the DNS host? I checked the Zoneedit docs but I could not find a way to do a URL rewrite. Need some advice. Thanks

    Read the article

  • Disabling URL decoding in nginx proxy

    - by Tomasz Nurkiewicz
    When I browse to this URL: http://localhost:8080/foo/%5B-%5D server (nc -l 8080) receives it as-is: GET /foo/%5B-%5D HTTP/1.1 However when I proxy this application via nginx: location /foo { proxy_pass http://localhost:8080/foo; } The same request routed through nginx port is forwarded with path decoded: GET /foo/[-] HTTP/1.1 Decoded square brackets in the GET path are causing the errors in the target server (HTTP Status 400 - Illegal character in path...) as they arrive un-escaped. Is there a way to disable URL decoding or encode it back so that the target server gets the exact same path when routed through nginx? Some clever URL rewrite rule?

    Read the article

  • Remove Trailing Slash from WordPress URL (The site also don't have www)

    - by mrintech
    I need help as I am confused a lot with .htaccess Some months back, I removed WWW from the URL of my domain name using following .htaccess lines: RewriteCond %{HTTP_HOST} !^example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] Now, I also want to remove the trailing slash from the URL, as because I am using WordPress and a page/post will open, no matter if there's a trailing slash or NOT! I request you to please provide me the .htaccess code, so that I can REMOVE the trailing slash. Kindly remember, I don't want WWW also and I have already set .htaccess rule for the removal of WWW Note: 3 Years back when I started the blog, I set the Permalinks Structure without trailing slash. Now, suddenly Google Webmasters Tools is showing warnings. Also, the URL for rel="canonical" is WITHOUT trailing slash If you require any more details, I will be happy to provide

    Read the article

  • Shortcut to open URL from clipboard

    - by good boy
    I want to create a shortcut that opens links from the clipboard. I frequently switch browsers and it's very annoying to copy/paste hundreds of URLs from one to another. I have created a shortcut to launch a page on each browser - but how can I make the URL field include data from clipboard, so that when I copy a URL and click on the shortcut, it will direct to the URL that is currently on the clipboard. If this is not possible, then is there an AutoHotKey script or something similar that can accomplish this? I would prefer a Desktop shortcut, but whatever works.

    Read the article

  • Squid url rewrites https>>http

    - by bobfran
    I'm exploring some uses with Squid proxy 2.7 and I have seen a good number of examples for url rewrites that take urls such as: http: //somesitename.com and then the rewriter can change the url to: https: //somesitename.com And those examples work great. What I'm wondering though, is if its possible to do the reverse with a squid url rewriter. that is, to go from https: //somesitename.com to http: //somesitename.com ? Simply trying to edit the script file that handles the rewrites doesn't seem to do the trick. So I was wondering if there are some certain things I have to configure squid to do first, if its even possible to do what I am asking. I have my browser manually set up to have squid as a proxy for all requests and I can see https requests showing up in my squid access.log file (via the CONNECT method).

    Read the article

  • MVC2 Routing + Ajax == ???

    - by Gnostus
    Im touching up an mvc2 application thats nearly complete, I have some ajax requests that end up looking alot like www.host.com/site/controller/action?UserName=asdf&UserPassword=asdfasdf&Email=asd%40df.com&PhoneNumber=541-345-5433&CompanyName="sdf" So my question is how (if possible) can I mask the ajax url on the redirect to simply be.. /controller/action, Im getting the feeling I broke pattern with my ajax and am stuck with nasty URLS. any mvc2 gurus out there willing to clarify?

    Read the article

  • ASP.NET MVC routing issue: How to allow "\" in id's

    - by Bipul
    I am using following route map routes.MapRoute( "RenderAssociatedForm", "DoAction/{nodeLevelId}/{nodeSystemId}", new { controller = "FrontEnd", action = "RenderAssociatedForm", }); Now nodeLevelId can be anything like zs\bbal. As we know that we should escape '\', so we are using 'zs%5cbbal'. But still the following url is not mapping to this route. //localhost/DoAction/zs%5cbbal/5 When I try simple Id without the escape character, it maps properly. Can anybody tell me where I am going wrong?

    Read the article

  • ASP.NET MVC2 Routing Issue With StructureMap

    - by alphadogg
    So, in global.asax, I have: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute(" { *favicon }", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); routes.IgnoreRoute("{*robotstxt}", new { robotstxt = @"(.*/)?robots.txt(/.*)?" }); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); } protected void Application_Start() { var container = new Container(); ServiceLocator.SetLocatorProvider(() => new StructureMapServiceLocator(container)); ComponentRegistrar.Register(container); Debug.WriteLine(container.WhatDoIHave()); // original MVC2 code at project startup AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); } and in my StructureMapControllerFactory, I have: protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType) { if (requestContext == null) { throw new ArgumentNullException("requestContext"); } if (controllerType == null) { //return base.GetControllerInstance(requestContext, controllerType); controllerType = GetControllerType(requestContext, "Home"); requestContext.RouteData.Values["Controller"] = "Home"; requestContext.RouteData.Values["action"] = "Index"; } try { return theContainer.GetInstance(controllerType) as Controller; } catch (StructureMapException) { System.Diagnostics.Debug.WriteLine(theContainer.WhatDoIHave()); throw; } } Now, normally, in most examples you find on the net, when controllerType is null, you have the commented out line (base.GetControllerInstance()) that handles it. However, if I use that, I get an error about not finding the controller for default.aspx when the controllerType is null at startup of the web app. If I force the use of the Home controller, I get the site to appear. What am I doing wrong? Is it a problem in routing?

    Read the article

  • How to use ASP.NET Routing in a Quote of the Day Website

    - by SidC
    Good Afternoon, A client is interested in creating an ASP.NET 2.0 website whose purpose is to serve up a "quote of the day". He wants the quotes on static content pages all attached to the same master page. The quote pages must be viewed in a certain sequence, and site browsers cannot view any other pages than the starting page when browsing to the site. That is, everyone must go to page 001.aspx when entering the site. Two Questions: 1. The content pages are going to be created by the client using an excel data source and a merge process by which each quote page is created eg. 001.aspx, 002.aspx etc. This seems clunky to me at best. Would ASP.NET Dynamic Data be a better solution here? I'm new to ASP.NET Routing and URL Rewriting as a whole. How would I setup a route table to ensure that users always entered the site on the same entry page, and create a route table such that default.aspx resolves to 001.aspx? Thanks, Sid

    Read the article

  • jscript1.js error in webforms when applying routing

    - by Sean N
    Hello I have a project using webforms. I applied routing on one of the page. My route is structure like this : http://localhost:3576/Request/Admin/Rejected/ = http://localhost:3576/Request/{role}/{action}/{id} Everything works great but i have a javascript error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Timestamp: Fri, 7 May 2010 13:35:54 UTC Message: Syntax error Line: 3 Char: 1 Code: 0 URI: http://localhost:3576/Request/Admin/Rejected/JScript1.js I think it's trying to route to the file where i stored my javascript functions. Any suggestion?

    Read the article

  • Postback not working with ASP.NET Routing (Validation of viewstate MAC failed)

    - by Robert
    Hi. I'm using the ASP.NET 3.5 SP1 System.Web.Routing with classic WebForms, as described in http://chriscavanagh.wordpress.com/2008/04/25/systemwebrouting-with-webforms-sample/ All works fine, I have custom SEO urls and even the postback works. But there is a case where the postback always fails and I get a: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Here is the scenario to reproduce the error: Create a standard webform mypage.aspx with a button Create a Route that maps "a/b/{id}" to "~/mypage.aspx" When you execute the site, you can navigate http://localhost:XXXX/a/b/something the page works. But when you press the button you get the error. The error doen't happen when the Route is just "a/{id}". It seems to be related to the number of sub-paths in the url. If there are at least 2 sub-paths the viewstate validation fails. You get the error even with EnableViewStateMac="false". Any ideas? Is it a bug? Thanks

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >