Search Results

Search found 28879 results on 1156 pages for 'pretty url'.

Page 117/1156 | < Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >

  • Zend Framework url redirect

    - by Uffo
    <?php class PI_Controller_Plugin_AssetGrabber extends Zend_Controller_Plugin_Abstract { public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { /* The module name */ $moduleName = $request->getModuleName(); /* This modules requires the user to be loggedin in order to see the web pages! */ $loginRequiredModules = array('admin'); if (in_array($moduleName,$loginRequiredModules)) { $adminLogin = new Zend_Session_Namespace('adminLogin'); if (!isset($adminLogin->loggedin)) { /*-------------------------------------- Here I want to redirect the user */ $this->_redirect('/something'); } } } } I'm trying to do a redirect $this->_redirect('/something') but doesn't work! Do you know how can I do a redirect in this case? Best Regards,

    Read the article

  • Weird IF THAN not working with Requested data from URL text problem

    - by StealthRT
    Hey all, i am checking for an internet connection by checking for a file on my server. The file only has the word LIVE displayed on the page. No HTML or anything else is there, just the word LIVE. When i run this code, i do get the NSLog as saying "LIVE" but once i go to check it with the IF statement, it fails and i just do not know why??? NSString* myFile = [NSString stringWithFormat:@"http://www.xxx.com/iPodTouchPing.html"]; NSString* myFileURLString = [myFile stringByReplacingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; NSData *myFileData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:myFileURLString]]; NSString *returnedMyFileContents=[[[NSString alloc] initWithData:myFileData encoding:NSASCIIStringEncoding] autorelease]; NSLog(@"%@", connected); if (connected == @"LIVE") { ... What am i doing wrong? I can not seem to find the reason?? David

    Read the article

  • using php Download File From a given URL by passing username and password for http authentication

    - by Acharya
    Hi all, I need to download a text file using php code. The file is having http authentication. What procedure I should use for this. Should I use fsocketopen or curl or Is there any other way to do this? I am using fsocketopen but it does not seem to work. $fp=fsockopen("www.example.com",80,$errno,$errorstr); $out = "GET abcdata/feed.txt HTTP/1.1\r\n"; $out .= "User: xyz \r\n"; $out .= "Password: xyz \r\n\r\n"; fwrite($fp, $out); while(!feof($fp)) { echo fgets($fp,1024); } fclose($fp); Here fgets is returning false. Any help!!!

    Read the article

  • Remove anchor from URL in C#

    - by kcoppock
    I'm trying to pull in an src value from an XML document, and in one that I'm testing it with, the src is: <content src="content/Orwell - 1984 - 0451524934_split_2.html#calibre_chapter_2"/> That creates a problem when trying to open the file. I'm not sure what that #(stuff) suffix is called, so I had no luck searching for an answer. I'd just like a simple way to remove it if possible. I suppose I could write a function to search for a # and remove anything after, but that would break if the filename contained a # symbol (or can a file even have that symbol?) Thanks!

    Read the article

  • Redirecting part of URL in Nginx

    - by Maca
    Trying to move my blog to a new site and I want to redirect some urls. I use nginx. https://blogurl.com/news/2014-08-19/post-3451/mt-preview-33e2742af1eb.php The /news/2014-08-19/post-3451/mt-preview-33e2742af1eb.php part would be always moving. Redirect to below: https://blogurl.com/content/news/2014-08-19/post-3451/mt-preview-33e2742af1eb.php I basically want to insert /content/ after https://blogurl.com and so far I have rewrite ^(.*)$ /content/ break; But my issue is my CMS sits on the same directory level https://blogurl.com/mt/admin and if I simply apply the rewrite above my CMS address would move too. How could I prevent this.

    Read the article

  • How to change web service URL in JBoss 5.1

    - by bosnic
    Environment: Windows 2003 JBoss 5.1 Code: @WebService @Stateless @SOAPBinding(style = Style.RPC) public class MyWebService { public String sayHello() { return "Hello"; } } wsdl is deployed in: http://localhost:8080/ear-project-ejb-project/MyWebService?wsdl I would like to define another path for this webservice, something like: http://localhost:8080/MyApplication/MyWebService?wsdl How to configure that in JBoss 5.1? Is there some kind of configuration that will work in any JEE server? Thanks

    Read the article

  • How to redirect by checking for a particular previous url

    - by Bearish_Boring_dude
    I have the following piece of code in my controller def index session[:previous_url] = URI(request.referer).path if session[:previous_uri] != new_path redirect_to registration_path(id: current_user.associate_username) end end However this does not actually work and i get a bad URI error. I just want to check if the request came from a particular page and if not redirect it to another page. I would also like to know if there is a better way for doing this?.Thank you

    Read the article

  • Unable to fetch Json data from remote url

    - by user3772611
    I am cracking my head to solve this thing. I am unable to fetch the JSON data from remote REST API. I need to fetch the JSOn data nd display the "html_url" field from the JSON data on my website. I saw that you need the below charset and content type for fetching JSON. <html> <head> <meta charset="utf-8"> <meta http-equiv="content-type" content="application/json"> </head> <body> <p>My Instruments page</p> <ul></ul> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script type="text/javascript"> $(document).ready(function () { alert("Inside the script"); $.getJSON(" https://pki.zendesk.com/api/v2/help_center/sections/200268985/articles.json", function (obj) { alert("Inside the getJSON"); $.each(obj, function (key, value) { $("ul").append("<li>" + value.html_url + "</li>"); }); }); }); </script> </body> </html> I referred to following example on jsfiddle http://jsfiddle.net/2xTjf/29/ The "http://date.jsontest.com" given in this example also doesn't work in my code. The first alert is pops but not the other one. I am a novice at JSON/ Jquery. i used jsonlint.com to find if it has valid JSON, it came out valid. I tested using chrome REST client too. What am I missing here ? Help me please ! Thanks in anticipation.

    Read the article

  • Get image url from rss Cdata

    - by zOro
    Hi , I start testing android , trying to get image from xml my Image is hosting inside xmlnode <a href="http://www.site.com/id/?id=41564"><img src="http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg" align="left" /></a> more text comes here i trying to get the http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg and displaying it ... Can you help me with that ? Thanks zOro..

    Read the article

  • Retrieving content of a txt file from URL to Android

    - by eightx2
    I would like to be able to retrieve contents of a .txt file from the internet, and load it in an EditText. I tried using the code on this page: Reading Text File From Server on Android It didn't work, as you might have guessed. I've read on numerous sites about this type of problem, but I can't get anything to work. Someone suggested AndroidHttpClient (http://developer.android.com/reference/android/net/http/AndroidHttpClient.html), but I simply can't find any examples with this. As I'm a newbie in Android programming, I would love if someone could please give me a small example.

    Read the article

  • FTP exception 501 "pathname" more than 8 characters

    - by BigMac66
    I am trying to access a file via a URI using the FTP protocol. For obvious security reasons I had to make some changes but this is where the problems seem to be coming from. My URI is as follows: ftp://user:[email protected]/u/Bigpathname/XYZ/ABC/BigPathname/bigpathname/xyz/abc/MY_LOG.LOG And I see this exception: sun.net.ftp.FtpProtocolException: CWD Bigpathname:501 A qualifier in "Bigpathname" is more than 8 characters This is really confusing as I can access the file from a Windows 7 command line with the CD command just fine. Both one directory at a time and as a full path. I found one article mentioning that MVS file names must be 8 or fewer characters but this does not explain how I can get to these same files from my command line! They do exist there is data there that I can download manual but I can not get there via a URI in Java. PS I use .toURL().openStream() to get files on my local machine just fine, it only fails when I try to get them from my server. EDIT October 1st I am able to access files on the MVS host using FileZilla and the basic FTP client from the Windows 7 command line - but I still cannot get them from a URI/URL. I downloaded a very basic Java built FTP client and tried accessing the same file in my program from there and the path works but because my file name has a dot in it "MY_LOG.LOG" I am getting File does not exist 501 Invalid data set name "MY_LOG.LOG". Use MVS Dsname conventions. I am utterly perplexed by this...

    Read the article

  • apache mod_rewrite making permanent url problem

    - by Yc Zhang
    In file .htaccess <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^\/*get_post\/(.*)$ get_post.php?slug=$0 [L] </IfModule> If I type http://example.com/get_post/abcde, I get an empty array of $_GET variable. How can I achieve the effect like this: http://example.com/get_post?slug=abcde

    Read the article

  • Force language change from custom account creation script through url

    - by jax
    I have made a custom 'Account Creation' script so that users can login from my phone application. What I want is to be able to change the responses from the server depending on their locale. So when I request a page I would add lang=en or lang=zh etc. This works http://mysite.com/phone/my_custom_account_creation.php?lang=en Response: <resource classification="error" code="Error (Code: 500)"> <message>Please enter your name:</message> </resource> This does not work: http://mysite.com/phone/my_custom_account_creation.php?lang=zh Response: <resource classification="error" code="Error (Code: 500)"> <message>Please enter your name:</message> </resource> If I go into Joomla at set the default language to chinese, it works. <resource classification="error" code="Error (Code: 500)"> <message>????????</message> </resource> but http://mysite.com/phone/my_custom_account_creation.php?lang=en does not work, instead it continues to show the chinese version. What might I be able to do here?

    Read the article

  • curl issue with URL not connecting

    - by bmucklow
    So I'm not a very good network person so I was hoping someone could point me in the right direction to figuring out what I am doing wrong. I am trying to use curl to post a SOAP message. I am running the following: curl -d "string of xml message" -H "Content-Type:text/xml; charset=utf-8" ":/" This results in a 'Connection refused' message. So I try pinging ip by itself...no problems. Then I think maybe I need http://:/ so I tried pinging http:// and I get: unknown host http:// yet if I ping the IP by itself I get no issues. Any thoughts on where to start debugging this issue?

    Read the article

  • Download HTML from website URL in objective C (iphone)

    - by Jonathan
    I'm trying to get the HTML data of a website so that I can parse it. I have parsing bit sorted out but using the following code doesn't seem to work: NSData *data = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString:@"http://thewebsite.net"]]; Is this the way I should be doing it or is there another way?

    Read the article

  • How to submit new url's to google ?

    - by stighy
    Hi guys, i've a questions. Hope you can help me : i would like to know what's the best way to submit new urls to google. My website create a dynamic sitemap but i don't know if i have to submit each time to google, or if google get my sitemap daily Thanks in advance

    Read the article

  • jQuery pass url variable into load function

    - by Adi
    Hi, I'm trying to use load to reload a portion of the current page (long story why) but am having an issue with the variable syntax. Here is the snippet of code: var pathname = window.location.pathname; $('#menu').load("/cms.php #menu"); I woudl like to replace /cms.php with the variable, but am having issues with the corrent syntax. Any help/advice would be much appricated. A.

    Read the article

  • Hide index.php from web site URL

    - by Gusepo
    Hi, I'm using htaccess rewrite engine to make urls look nice, from www.mysite.com/index.php?pag=home to www.mysite.com/pag/home it works fine with this rule RewriteRule ^pag/([^/]+)$ index.php?pag=$1 [L,QSA,NC] but when I go to www.mysite.com it redirects me to www.mysite.com/index.php is there a way to redirect to www.mysite.com/pag/home? I tried redirect 301 /index.php http://www.mysite.com/pag/home but when i try to go to www.mysite.com the browser gives my "page do not exsist error"

    Read the article

< Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >