url

Mod_rewrite - how to 301 redirect an old URL to a new one

Hi, I need to grab some of my website's old URLs and do a 301 redirect to the new ones, since they are already indexed and we don't want to loose relevance after the change. The old URL is in fact very ugly and for some reason everything I try to do to rewrite it does not work. Here it is: http://www.mywebsite.com/ExibeCurso.asp?Comando...

Does ASP.NET MVC Handle *#%":?<> Characters In The URL?

I am new to ASP.NET MVC. I am getting an error when i use these characters - *#%":?<> - in URL. My question is - Does ASP.NET MVC handle *#%":?<> characters in the URL? ...

Joomla URLs: An article doesn't have a pretty URL by itself?

I'm new to Joomla (1.5), and I'm trying to clarify something about the way Joomla handles URLs. I've activated what they call "Search Engine Friendly URLs". But it appears that a page (or an "Article" only gets such a URL once I link to it from a menu. Are pretty (parameter-less) URLs really only assigned to pages once I link to them...

How to get OSM xml or json data from an url?

I have been working on twitter api and found it easy to get json/xml feed from an url like http://twitter.com/friends/ids.json?screen_name=Planemad&amp;jsoncallback=? similarly i wanted to know if there is a way to get OSM json/xml data from an url and use that and use it on an OSM map.... ...

ASP.NET Alternative to Shorty

Does anyone know of an ASP.NET alternative available for Shorty (http://get-shorty.com/)? ...

Redirect all requests for a subdirectory in Tomcat 6.0

Hello All, I'm running a local Tomcat 6.0 server on my desktop. I'm trying to redirect any and all requests matching http://localhost:8080/RedirectDirectory/abc/efg/morejunk to a single JSP page. In my RedirectDirectory project's web.xml I have <servlet> <servlet-name>IOPRedirect</servlet-name> <jsp-file>/RedirectDirectory/filetree....

Google using # instead of search? in URL. Why?

I'm not sure how long they've been doing it but I just noticed google using # in their search url instead of search?. New way http://www.google.com/#q=stackoverflow Old way http://www.google.com/search?q=stackoverflow The pound/hash sign is generally used as an anchor to a section of a page. Besides a shorter url what could be the bene...

What is the fastest way to determine if a URL exists in PHP?

I need to create a function that returns if a URL is reachable or valid. I am currently using something like the following to determine a valid url: static public function urlExists($url) { $fp = @fopen($url, 'r'); if($fp) { return true; } return false; } It seems like there would be something faster, may...

url problem with json data

For the API script of followcost.com. It is given that for using the follow cost API follow cost has a simple JSON API. Send a GET request to followcost.com using the Twitter user name: GET /lof.json The server responds (formated for clarity): 200 OK Content-Type: application/json {"milliscobles_all_time":141.93, "average_tweets_p...

How to handle special characters in .htaccess rules?

In my .htaccess file I have defined following rule, RewriteRule t/([^.]+)/$ /videos/tag.php?tag=$1 [QSA] The above rule works fine if I am browsing http://example.com/videos/t/world+news/ or http://example.com/videos/t/events/ but when I am browsing http://example.com/videos/t/business+%26+world/ (here original tag is: business & w...

How can I detect the file type of image at a URL?

How to find the image file type in Perl form website URL? For example, $image_name = "logo"; $image_path = "http://stackoverflow.com/content/img/so/".$image_name From this information how to find the file type that . here the example it should display "png" http://stackoverflow.com/content/img/so/logo.png . Supposer if it has...

how do I make ASPX Web pages without file extensions?

I have notice that stackoverflow.com does not have file extensions on their pages. How would I do this with an aspx web site? ...

GWT URL Parameters

What is the proper way to use URL parameters? My URL is this: http://localhost:8080/#pg5?testing=abc In my code I try to get the value of testing using this line of code: String value = com.google.gwt.user.client.Window.Location.getParameter("testing"); Unfortunately all this does is set my string to "undefined". I thought perhaps ...

Encoding&compression of URL in PHP

How to easy encode and "compress" URL/e-mail adress to string in PHP? String should be: difficult to decode by user as short as possible (compressed) similar URLs should be different after encoding not in database easy to decode/uncompress by PHP script ex. input -> output, stackoverflow.com/1/ -> "n3uu399", stackoverflow.com/2/ ...

Java : File.toURI().toURL() on Windows file

The system I'm running on is Windows XP, with JRE 1.6. I do this : public static void main(String[] args) { try { System.out.println(new File("C:\\test a.xml").toURI().toURL()); } catch (Exception e) { e.printStackTrace(); } } and I get that : file:/C:/test%20a.xml How comes that the given URL has no...

JSF Link Parameter get null

I have a page with link http://localhost:8080/Test/Page.faces?id=asdasdasd The page got 2 text field and one button, after user key in the details and click submit, it works well when you first time click the submit button, the id will return me the exact value, but if the user never enter the value and click submit the validation will ...

What are the valid characters that can show up in a URL host?

I'm writing some code that processes URLs, and I want to make sure i'm not leaving some strange case out... Are there any valid characters for a host other than: A-Z, 0-9, "-" and "."? (This includes anything that can be in subdomains, etc. Esentially, anything between :// and the first /) Thanks! ...

Are there APIs for translating short url's back to regular links?

I want to translate bulk numbers of short url's coming streamed from twitter. Rather than accessing each individual request I want to use API's that accept a list of short or tiny URL's and return the original URL's. Are such API's available? ...

json data not responding to alert

$(document).ready(function() { $('form#search').bind("submit", function(e){ e.preventDefault(); $('#content').html(''); var query1 = urlencode($('input[name="user_a"]').val()); //userA $.getJSON('http://twitterank.com/...

regex to strip out image urls?

I need to separate out a bunch of image urls from a document in which the images are associated with names like this: bellpepper = "http://images.com/bellpepper.jpg" cabbage = "http://images.com/cabbage.jpg" lettuce = "http://images.com/lettuce.jpg" pumpkin = "http://images.com/pumpkin.jpg" I assume I can detect the start of a link wi...