url

how to pass the parameters to the urlconnection in java/android?

hi all, i can establish a connection using HttpUrlConnection. my code below. client = new DefaultHttpClient(); URL action_url = new URL(actionUrl); conn = (HttpURLConnection) action_url.openConnection(); conn.setDoOutput(true); conn.setDoInput(true); conn.setRequestProperty("userType", "2"); conn.setRequestProperty("Content-Type", "app...

site not working with url www

hello im having problem with my site when i type http://example.com it works fine but when i type http://www.example.com it displays page cannot be found , what is the problem i couldnot find , i tried .htaccess redirection also RewriteEngine On RewriteCond %{HTTP_HOST} ^www.example.com [nc] RewriteRule (.*) example.com/$1 [R=301,L] ...

Testing URLs in groovy

Hi all, How can we check whether urls are working or not in groovy? when we click a button, i will get all the urls from existing db from 'urls' table and need to check which url is working Ex: http://baldwinfilter.com/products/start.html - not working http://www.subaru.com/ - working and so many urls from db. My aim is to get all ur...

URL encoding for latin characters in Java

I'm trying to read in an image URL. As mentioned in the java documentation, I tried converting the URL to URI by String imageURL = "http://www.shefinds.com/files/Christian-Louboutin-Décolleté-100-pumps.jpg"; URL url = new URL(imageURL); url = new URI(url.getProtocol(), url.getHost(), url.getFile(), null).toURL(); URLConnection conn = ...

Grails URL's with Tomcat/Apache ProxyPass

Grails tends to write out the URL for everything that uses its tags as /appName/whatever. For instance, if I use the tag: <g:javascript library="jquery"/> the resulting tag is <script src="/appName/jquery/jquery.js"></script> This causes an issue with using ProxyPass with Apache/Tomcat. All of my CSS, JS, Images and links have th...

url without file name

Hi devs! I have seen urls like website.com/admin/ that don't actually show the "index.html" or file name after the last slash. How is this achieved? Thank you! ...

connection didReceiveData called twice while posting a Url in iphone?

I am new to iphone development.I have posted the URL with the user-name and password. I am able to print the data in "connection didReceiveData " method.But i see "connection didReceiveData" method called twice.I don't know ,where i am going wrong. Here is my code - (void)viewDidLoad { [super viewDidLoad]; NSString *post = [NSString...

Programmatically setting Absolute URL inside image controls for .NET Facebook Application

The goal is to allow a function to be called from within an ASPX imagebutton control that is used as part of a form. The need for an absolute URL is that Facebook Canvas applications require them. So the rendered control should look something like <input type="image" src="http://myURL.com/images/submit.gif" /> The ASPX markup might be ...

Base URL in ASP.net Master Pages with virtual Directories

Hi All, I have an ASP.net master page. In this master, I have all my css and javascript files defined. I also have a few images and a few buttons and hyperlinks. All the urls are all declared as relative ie "/scripts/ian.js" Everything works fine if this site is the root website, but I need it to work in a virtual directory. My probl...

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

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 millio...

URL losing port number in every page load

I'm currently taking care of a certain local website. The default port has been changed, and can no longer be not included in the URL due to technical reasons, so now i'm using a certain port in the end of the IP at the URL, for example 100.100.100.100/website.aspx no longer works (which accessed 80 by default) 100.100.100.100:81/we...

Possible to have ampersands ("&") in URL BEFORE the query string?

My client is determined to have a page at /nfm&t so I made a directory named nfm&t with an index.html (to test) and that URL is still throwing a 404. So apparently it's not that easy. Any ideas? Or is there a way to just redirect nfm&t to nfmt, so that the URL at least resolves? This is a Windows server, by the way, which throws a wren...

Can an AIR app be programmed to handle a URL protocol?

I'm writing what is essentially a browser in Adobe AIR (ActionScript, not AJAX). A great bit of functionality to implement would be protocol handling. iTunes, for instance, handles itms protocols; when your friend sends you a link beginning with "itms://", it's going to launch iTunes as long as it's installed. Is there a way to write an ...

Using // in a <script>'s source

Hello fellow front-end web h4X0|2s, I was wondering if anyone had any resources, proof, or personal experience in using the age-old http/https JavaScript hack: <script src="//someserver.com/js/script.js"></script> Has anyone encountered issues in any of these browsers (IE 5.5+, FF2+, Chrome, Opera 9+, Safari 3+)? Has anybody had su...

Java - Creating a httprequest the uses the header information from previous request

I got some sample code from the net here: http://www.javadb.com/sending-a-post-request-with-parameters-from-a-java-class That works fine. It sets the relevant headers in the response. However, what if I wanted to visit another url on the same site with those headers? If I create another URL object the session is lost. How do I maintain ...

ASP.NET Routing (in WebForms)not working when deployed under IIS,Works in IDE

I have an ASP.NET web application(webforms,not MVC) developed in VS 2008 and i have implemented ASP.NET web forms URL routing by following this link http://www.4guysfromrolla.com/articles/051309-1.aspx#postadlink It works pretty good when i run it on the Visual studion IDE.But does not works when i created a site under my IIS (IIS 5...

Can nginx run a unix command based on url?

Is it possible to configure nginx to run a unix command based on a url? For example: http://localhost/list/usr/local This runs: ls /usr/local Then returns the results? ...

Call a variable's content in a URL - AS3

I have this variable and XML object (np tag) var addedNumber:String; for (var i:int=0; i<xmlList.length(); i++) { var picURL:String = xmlList[i].url; var picName:String = xmlList[i].username; var addedNumber = xmlList[i].np; etc... and I need to call this variable content here, inside a dynamic url function navigateToRight(evt:Mouse...

Passing & in URL variable with the help of urlencode

I have done urlencode of the variable before passing to the URL http://example.com/Restaurants?alias=F%26B But when I try to print like in the page $alias = rawurldecode($_GET['alias']); echo $alias; it prints only F. How to solve this? ...

Regex: absolute url to relative url (C#)

I need a regex to run against strings like the one below that will convert absolute paths to relative paths under certain conditions. <p>This website is <strong>really great</strong> and people love it <img alt="" src="http://localhost:1379/Content/js/fckeditor/editor/images/smiley/msn/teeth_smile.gif" /></p> Rules: If the url conta...