Search Results

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

Page 87/817 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • magento - multilingual site + Add store codes to url - want to show flag icons

    - by Mustapha George
    I want to have a multi-language magento site use a flag image instead of a language selector box for user to select language of page. There is a nice article on this at http://www.atwix.com/magento/replace-language-selector-flag-icons/ Only issue is that we use "Add store codes to url" option. I hacked this code, but it can use some refinement and make it more Magento looking. <?php if(count($this->getStores())>1): ?> <div class="form-language"> <div class="langs-wrapper"> <?php foreach ($this->getStores() as $_lang): ?> <?php if ($_lang->getCode() != 'default'): ?> <? $base_url = Mage::getBaseUrl(); // remove language in base url $base_url = str_replace('/en/' , "" , $base_url); $base_url = str_replace('/fr/' , "" , $base_url); $current_url = $this->helper('core/url')->getCurrentUrl(); // take out base url and language code $rest_of_url = str_replace($base_url , "" , $current_url); $rest_of_url = str_replace('/en/' , "" , $rest_of_url); $rest_of_url = str_replace('/fr/' , "" , $rest_of_url); // assmble new url $new_url = $base_url . '/' . $_lang->getCode() . '/' . $rest_of_url; ?> <a class="lang-flag" href="<?php echo $new_url ;?>"><img src="<?php echo $this->getSkinUrl('images/flags/' . $_lang->getCode() . '.png');?>" alt=""></a> <?php endif;?> <?php endforeach;?> </div> </div> <?php endif;?>

    Read the article

  • Zend remove anchor text in url redirect

    - by user351785
    I have a form that is using an anchor name as it's action so that when the form is submitted it is it goes straight back to the form (for example 'www.domain.com/page#contact-form). The idea is if there are any errors then it'll go straight to the form (that's near the bottom of the page) so you can see the errors and continue filling in the form. If the form is valid, I want it to redirect to another page (for example www.domain.com/another-page). The problem is that the redirect url still has the anchor text in the url (in the above example it is www.domain.com/another-page#contact-form). I am using $this->_helper->redirector->goToRouteAndExit(array(), 'another-page', true); to goto the another-page route. I have tried setting the url specifically but that doesn't fix it either. How do I redirect to another page and remove that anchor text from the url?

    Read the article

  • google url shortener api and jquery not working

    - by rahim
    i cant seem to get google's new url shortener api to work with jquery's post method: $(document).ready(function() { $.post("https://www.googleapis.com/urlshortener/v1/url", { longUrl: "http://www.google.com/"}, function(data){ console.log("data" + data); }); $('body').ajaxError(function(e, xhr, settings, exception) { $(this).text('fail'+e); console.log(exception); }); }); all of this gives me an empty (data) response AND an empty (exception) response. any ideas? ive also tried this with no success: $.ajax({ type: 'POST', url: "https://www.googleapis.com/urlshortener/v1/url", data: { longUrl: "http://www.google.com/"}, success: success, dataType: "jsonp" });

    Read the article

  • Wordpress is ignoring Unicode Chars in URL

    - by Ankur Gupta
    Hi, I am using wordpress with this type of permalink: /%year%/%monthnum%/%postname%/ if I use this type of url: example.com/2010/03/????? it treats this url like this example.com/2010/03/ (By ignoring unicode chars) and displays March 2010 archive list. if I use english url: example.com/2010/03/technology then it works perfectly. This problem occurs even on tags page: for example example.com/tag/??????? is treated like example.com/tag/ and displays 404 page. Why wordpress is ignoring unicode chars? If I use default querystring structure then it works perfectly even with unicode characters. Server Info: IIS7 Win2008 Server (Url rewriting enabled) Wordpress 2.9.2

    Read the article

  • Map Custom URL protocol to HTTP (using NSURLProtocol?)

    - by Francisco Ryan Tolmasky I
    I have an application using a WebKit WebView and I'd like to map URL's that are loaded in this WebView with a custom URL protocol to a different HTTP URL. For example, say I am loading: custom://path/to/resource I would like to internally actually load: http://something-else.com/path/to/resource In other words, the custom protocol serves almost as a shorthand. I can't however use -webView:resource:willSendRequest:redirectResponse:fromDataSource:, because I want WebKit to actually believe this is the URL in question, not to simply redirect from one to the other. So far I've been attempting to use a custom NSURLProtocol subclass. However, this is proving trickier than I first thought because, at least to my understanding, I will have to do the actual loading myself in the NSURLProtocol subclass' startLoading method. I'd like a way to just hand off the work to the existing HTTP protocol loader, but I can't find an easy way to do this. Does anyone have a recommendation for this, or perhaps an alternative way to solve this issue? Thanks!

    Read the article

  • PHP URL Security Question

    - by TaG
    I want to have users store the url in my database I'm using php mysql and htmlpurifier I was wondering if the following code was good way to filter out bad data? Here is the Partial PHP code. $url = mysqli_real_escape_string($mysqli, $purifier->purify(htmlspecialchars(strip_tags($_POST['url'])));

    Read the article

  • Problem in implementing the Url Rewritting for a Zend Application

    - by Nishant
    Hello everyone, I am doing my first Zend Applicaition and I am finally done with the coding side. But the problem which I have is Client has asked to rewrite the Url's which follows the SEO and as I don't have much knowledge of the Zend Router,I am finding myself helpless this time. Please helo me out.The current Url which I have is... http://localhost.ZendProject.com/keywords/ball and Client needs it like http://localhost.ZendProject.com/keywords/ball and another Url (the search Url) http://localhost.ZendProject.com/search/trends?q=nishant+shrivastava&select=All&Search=Search and the Client wants is http://localhost.ZendProject.com/nishant-shrivastava Please help me out of this problem,because I am totally freaked out thinking of any solution and my mind is also not helping me out.

    Read the article

  • C# WebClient OpenRead url

    - by Octopus-Paul
    So i have this program that fetch a page using a short link (I used Google url shortener) to build my example i used the code from Using WebClient in C# is there a way to get the URL of a site after being redirected? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Net; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { MyWebClient client = new MyWebClient(); client.OpenRead("http://tinyurl.com/345yj7x"); Uri uri = client.ResponseUri; Console.WriteLine(uri.AbsoluteUri); Console.Read(); } } class MyWebClient : WebClient { Uri _responseUri; public Uri ResponseUri { get { return _responseUri; } } protected override WebResponse GetWebResponse(WebRequest request) { WebResponse response = base.GetWebResponse(request); _responseUri = response.ResponseUri; return response; } } } I do not understant a thing: when i do client.OpenRead("http://tinyurl.com/345yj7x"); this downloads the page that the url points to? If this method downloads the page, I need something to get me only the url, so if there a method to get only some headers, or only the url please let me know.

    Read the article

  • Using .htaccess to replace backslash in URL with forward-slash

    - by DamienL
    I realise that a backslash should never appear in a URL in a form other than a URL escape code, however in this case the URL's are being generated by a .NET application for generating flashbooks. I have contacted the developer of this application with a bug report. In the interim i would like to use .htaccess to rewrite the offending backslashes. This is how the URLs appear in fiddler debugging proxy. www.example.com/folder/folder/thumbs%5C1.jpg I am using Firefox and it looks as though Firefox is translating them into the URL encoded equivalent ( \ == %5C1 ). Interestingly IE translates the backslash into a forward-slash automatically (not adhering to standards but convenient in this case). Is there a way to use .htaccess to rewrite all \ to /?

    Read the article

  • Add custom param to odata url

    - by Toad
    I want to add some authentication to my odata service. The authorization token i want to include in the url as param so that the url can be used in excel How would one be able to receive and parse any addition param supplied in the url before the odata service does it's thing? (i'm using entitie framework and wcf dataservices)

    Read the article

  • Can I load a UIImage from a URL?

    - by progrmr
    I have a URL for an image (got it from UIImagePickerController) but I no longer have the image in memory (the URL was saved from a previous run of the app). Can I reload the UIImage from the URL again? I see that UIImage has a imageWithContentsOfFile: but I have a URL. Can I use NSData's dataWithContentsOfURL: to read the URL? EDIT based on @Daniel's answer I tried the following code but it doesn't work... NSLog(@"%s %@", __PRETTY_FUNCTION__, photoURL); if (photoURL) { NSURL* aURL = [NSURL URLWithString:photoURL]; NSData* data = [[NSData alloc] initWithContentsOfURL:aURL]; self.photoImage = [UIImage imageWithData:data]; [data release]; } When I ran it the console shows: -[PhotoBox willMoveToWindow:] file://localhost/Users/gary/Library/Application%20Support/iPhone%20Simulator/3.2/Media/DCIM/100APPLE/IMG_0004.JPG *** -[NSURL length]: unrecognized selector sent to instance 0x536fbe0 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL length]: unrecognized selector sent to instance 0x536fbe0' Looking at the call stack, I'm calling URLWithString, which calls URLWithString:relativeToURL:, then initWithString:relativeToURL:, then _CFStringIsLegalURLString, then CFStringGetLength, then forwarding_prep_0, then forwarding, then -[NSObject doesNotRecognizeSelector]. Any ideas why my NSString (photoURL's address is 0x536fbe0) doesn't respond to length? Why does it say it doesn't respond to -[NSURL length]? Doesn't it know that param is an NSString, not a NSURL?

    Read the article

  • Jquery, AJAX and URL changes...

    - by user305270
    Jquery, AJAX and URL changes... I have a gallery, and when the image change i would like to change my url to "#image_id=321" and when i load an url with this appended: "#image_id=321", loads the image with id 321. is this possible to make without the "#" and using "/photo-id/321"? thanks

    Read the article

  • ajax parameter to send correctly a variable to a specified url

    - by kawtousse
    I am trying to send data to a servlet from a js file but the servlet never received the parameter. so this is what I have: function showProject(prj) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url="ServletxmlGenerator"; idprj = prj.options[prj.selectedIndex].value; //alert(idprj); url=url+"?idprj="+idprj; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } and to capture th request it is with: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String projectcode=request.getParameter("idprj"); System.out.println("++++projectCode:=" +projectcode); the output is like: ++++projectCode:=null Can any one explain it to me it seems to be correct but i didnot find the error.Thinks

    Read the article

  • how to pass url in mailto's body

    - by Simer
    i need to send a url of my site in body so that user can click on that to join my site. but it is coming like this in mail client: Link goes here http://www.example.com/foo.php?this=a url after & is not coming then whole process of joining failed. how can i pass url like these in mailto body http://www.example.com/foo.php?this=a&join=abc&user454 <a href="mailto:[email protected]?body=Link goes here http://www.example.com/foo.php?this=a&amp;really=long&amp;url=with&amp;lots=and&amp;lots=and&amp;lots=of&prameters=on_it ">Link text goes here</a> i have searched alot but did't got right answer thanks

    Read the article

  • Automatically hyper-link URL's and Email's using C#, whilst leaving bespoke tags in place

    - by marcusstarnes
    I have a site that enables users to post messages to a forum. At present, if a user types a web address or email address and posts it, it's treated the same as any other piece of text. There are tools that enable the user to supply hyper-linked web and email addresses (via some bespoke tags/markup) - these are sometimes used, but not always. In addition, a bespoke 'Image' tag can also be used to reference images that are hosted on the web. My objective is to both cater for those that use these existing tools to generate hyper-linked addresses, but to also cater for those that simply type a web or email address in, and to then automatically convert this to a hyper-linked address for them (as soon as they submit their post). I've found one or two regular expressions that convert a plain string web or email address, however, I obviously don't want to perform any manipulation on addresses that are already being handled via the sites bespoke tagging, and that's where I'm stuck - how to EXCLUDE any web or email addresses that are already catered for via the bespoke tagging - I wan't to leave them as is. Here are some examples of bespoke tagging for the variations that I need to be left alone: [URL=www.msn.com]www.msn.com[/URL] [URL=http://www.msn.com]http://www.msn.com[/URL] [[email protected]][email protected][/EMAIL] [IMG]www.msn.com/images/test.jpg[/IMG] [IMG]http://www.msn.com/images/test.jpg[/IMG] The following examples would however ideally need to be automatically converted into web & email links respectively: www.msn.com http://www.msn.com [email protected] Ideally, the 'converted' links would just have the appropriate bespoke tags applied to them as per the initial examples earlier in this post, so rather than: <a href="..." etc. they'd become: [URL=http://www.. etc.) Unfortunately, we have a LOT of historic data stored with this bespoke tagging throughout, so for now, we'd like to retain that rather than implementing an entirely new way of storing our users posts. Any help would be much appreciated. Thanks.

    Read the article

  • Limit URL Parameter Length in Web.Config

    - by Alex
    Is it possible to add some kind of restriction to the web.config to limit URL parameter length? I want to prevent people at the earliest possible point from submitting too large URL parameters so the server doesn't get taxed more than necessary in the event that somebody tries to "attack" it with large invalid URL parameters.

    Read the article

  • AxWindowsMediaPlayer does not play audio/video from url ?

    - by Madhup
    HI, I am using activeXMediaPlayer to play files from url but each time I pass a url to it shows the message , "either the file is corrupted or player does not support the file format u are playing." But when i run the same url on browser the file is downloaded and this downloaded file can be played on the media player. I am not able to find out what the problem is . Because the same cod plays the local file and the downloaded files but not file from url Although the same code worked few months ago for the urls So is this my fault or some server related issues can affect this thing. Please help me I am in big trouble. Regards, Madhup

    Read the article

  • Facebook redirect after login not working when url is dynamic

    - by dythffvrb
    This is my code: $loginUrl = $facebook->getLoginUrl(array( 'scope' => 'publish_actions', 'redirect_uri' => 'http://mysite.com/', )); It works but if I remove redirect_uri it doesn't work anymore. $loginUrl = $facebook->getLoginUrl(array( 'scope' => 'publish_actions' )); According to Facebook domcumentation redirect_uri is optional. https://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/ Im trying to redirect the users to the same url they were on before logging in. Update: This problem occurs when the url is mysite.com/post23 but when url is mysite.com/staticpage or mysite.com there are no problems Any workarounds? EDIT: It looks like a bug, it doesn't work with certain url in the same site I wil try and report it to Facebook.

    Read the article

  • getting parts of url window.location

    - by ilkin
    Can someone help me with url hash? I use this code to get the current url and then send the data as json, but the hash part seems to be stripped then. i tryed to use href and hash and i always get the default.aspx but no hash part like #anchor. var location = String(window.location); var title = String(document.title); var text = { 'url': location, 'title': title };

    Read the article

  • C#: convert Unicode to use as url

    - by Feryt
    Hi. I'm working on multilingual Asp.NET MVC application. In url i need to use category name. Is there any way how to convert i.e japanese text to its url safe equivalent? Or should i use original text in url(www.example.com/??/? = www.example.com/product/car)?

    Read the article

  • jquery ajax vs browser url

    - by danwoods
    Hello all, I'm trying to use youtube's api to bring back a listing of a user's videos. The request url looks something like: http://gdata.youtube.com/feeds/api/users/username/uploads with 'username' being the correct username. This bring back the appropriate url in the browser. However when I try to access that url via jQuery's $.ajax or $.get functions, using something like: $.ajax({ //set parameters url: "http://gdata.youtube.com/feeds/api/users/username/uploads", type: "GET", //on success success: function (data) { alert("xml successfully captured\n\n" + data); }, //on error error:function (XMLHttpRequest, textStatus, errorThrown, data){ alert(" We're sorry, there seem to be a problem with our connection to youtube.\nYou can access all our videos here: http://www.youtube.com/user/username"); alert(data); } }); $.get("http://gdata.youtube.com/feeds/api/users/username/uploads", function(data){ alert("Data Loaded: " + data); }); I get an empty document returned. Any ideas why this is?

    Read the article

  • Make phone browser open a URL on Symbian S60 3rd Ed programmatically

    - by ardsrk
    On clicking a URL displayed in my application running on a Symbian S60 3rd Edition device should make the phone browser ( which is already open ) open the specified URL. Here is the code: _LIT( KUrlPrefix,"4 " ) void CMunduIMAppUi::OpenInBrowser(const TDesC& aUrl) { HBufC *url = NULL; const TInt KWmlBrowserUid =0x10008D39; TUid id( TUid::Uid( KWmlBrowserUid ) ); TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); TApaTask task = taskList.FindApp( id ); // Checks if the browser is already open if ( task.Exists() ) { HBufC8* parameter = HBufC8::NewL( aUrl.Length()+ KUrlPrefix().Length()); parameter->Des().Copy(KUrlPrefix); parameter->Des().Append(aUrl); task.BringToForeground(); task.SendMessage(TUid::Uid(0), *parameter); // UID not used delete parameter; parameter = NULL; } } When I use this code to open a URL the browser comes to the foreground but does not get directed to the URL. I suspect something is wrong in SendMessage call that is called after the browser is brought to foreground: task.SendMessage(TUid::Uid(0), *parameter); // UID not used

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >