url

RubyCAS-Client question: Rails

I've installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It's working, but I'd like to remove the ?ticket= in the url. Is this possible? ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : http://myapp.com/objects/1?auth%5Fcode=833fe7bdc789dff996f5de46075dcb409b4bb4f0 However it is too long and I think I might be able to "com...

Encoding of window.location.hash

Does window.location.hash contain the encoded or decoded representation of the url part? When I open the same url (http://localhost/something/#%C3%BC where %C3%BCtranslates to ü) in Firefox 3.5 and Internet Explorer 8, I get different values for document.location.hash: IE8: #%C3%BC FF3.5: #ü Is there a way to get one variant in both...

How to do dynamic URL Rewriting in J2EE

Back in my ASP.NET days, I used URLRewriter.NET to do dynamic URL Rewrites. Basically, it's an HTTPModule that intercepts page requests and rewrites the URLs according to rules that you define, very similar to MOD_REWRITE. However, it also lets you define a "Custom Transform," a class with a single method that does URL translations for...

Why is WebView unable to open some local URLs (Android)?

I have a WebView that I'm using to open some files stored in the assets/ directory of my project. It works fine for most of the files, but there's one in particular (and I'm sure others I haven't found) that it just will not open. The file I'm having problems with is named: "assets/ContentRoot/Photos/XXX Software Logo - jpg - 75%.JPG...

Domains & Foreward Slash

Hi, This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b.com sub2.site-b.com Notice the two sub domains! However, our client has asked if we can implement the following url structure inst...

Bookmarklet to grab the current website address but without http://

The other day you were very helpful. Now I have another question. I have a bookmarklet to grab the current URL or I should say host name (without the http:// part - which is ok) like: javascript:q=(document.location.host); void(open('http://mysite.com/search.php?search='+location.host,'_self','resizable,location,menubar,toolbar,scrollba...

Reading content of URL in java - redirect problems

When I execute the following java program, sometimes I get an empty response, sometimes I get the real (redirected) content. ByteArrayOutputStream output = new ByteArrayOutputStream(); URL url = new URL( "http://stackoverflow.com/questions/84629" ); IOUtils.copy( url.openStream(), output ); System.out.println( output.toString() ); The...

How to design URI for a resource that occupies different positions in a hierarchy?

What's the best way to represent a list resource when the list can be "owned" by different resources? Take your typical blog example. Say you've got Posts, Comments and Users. A Post has many Comments and a User is the author of many Comments. You may want to get a list of Comments within the context of a given User (e.g. that User's...

How to hide my url params?

I've got several Portlets with some links in them, all I want is to hide the URL params. So I thought it would be easy to include some jQuery code, which builds a form for each and binds a click event on it to submit the form. This does not work. The action request isn't hit for some reason. Does anyone have a different suggestion for...

WebClient problem with URL which ends with a period

I'm running the following code; using (WebClient wc = new WebClient()) { string page = wc.DownloadString(URL); ... } To access the URL of a share price website, http://www.shareprice.co.uk If you append a company's symbol name onto the end of the URL, then a page is returned which I parse to get the latest price info etc. e....

ampersand not passing through url

On my site www.gibberize.com if you type in the word "and" in the top textarea, the character "&" will appear in the second textarea. The problem is that the "tweet it" link will then append the second textarea's text to a url and proceed to the link, but because it is an ampersand it will break the text. Any solutions? ...

Basic URL Rewrite Problem in PHP (mod_rewrite)

In my .htaccess, I have the following RewriteEngine On RewriteRule ^users/?$ users.php RewriteRule ^users/([a-z]+)/?$ users.php?username=$1 Everything works as intended if I do http://example.com/users/ http://example.com/users/joeschmoe/ and PHP will read "joeschmoe" as the value for $_GET['username'] However, if I do ht...

Developing Locally for a site that, when live, utilises Url Rewriting.

I've just installed and configured my server (WS2008, IIS7) with version 2 of the URL Rewriting Module. I've setup a simple static redirect as follows /contact >>> /pages/contact/default.aspx So users of the site have a simple url to get to the original, longer file path. It works great and even post backs to the right place. My ques...

Creating a Web Navigation Helper Class for MVC

Hi, Im a newbie to MVC and trying to use the web navigator class in my MVC application. http://polymorphicpodcast.com/shows/webnavigator/ The class enables us to have stongly typed urls in a central class file. I have 3 questions: Is this the best way of storing strongly typed urls in MVC or does MVC has some special helper methods...

Issue with Url Routing(System.Web.Routing) 3.5 in Godaddy...(non-MVC App)

Hi, I am using System.Web.Routing namespace in Asp.Net 3.5 non-mvc app. Its working perfect in local machine but I tried deploying in godaddy server it doesnt work Does anyone has experiece with them ? Thanks in Advance.. Deepu ...

How to upload images to picasa web album as "Web address (URL)" ??

The Web album http://picasaweb.google.com has only the option to browse images from disk. What if I do not have images/photos on disk and I don't want to download image. If I know the URL of the image, can I avoid the round-trip of downloading and then uploading back to "Picasa web album" ?? ...

URL Rewriting In PHP MVC Framework

Hello there, I have made my own custom php framework which implements MVC design pattern. In it, all URLs are constructed like this mysite.com/index.php?route=controller/function/parameters/go/here mysite.com/index.php?route=products/shirts/99 etc I have put in place htaccess to remove index.php?route= part from URLs to make them m...

HTTPS requests and multi-threading

Is Java's URL class a thread-safe, in particular URL.openConnection()? In my application, I make tens of concurrent HTTPS connections a second to the same URL, and I would like to maximize object reuse. Yet, it's not clear from the documentation what can be reused. EDIT: I'm open to using a different library if needed. ...

replace URLs in text with links to URLs

Using Python I want to replace all URLs in a body of text with links to those URLs, like what Gmail does. Can this be done in a one liner regular expression? Edit: by body of text I just meant plain text - no HTML ...