url

How can I make clean search urls?

If I have search that has a lot of different options, then url becomes very long and looks very bad. Is there anyway to make urls look better? Using POST to make search would keep urls clean, but people couldn't share search urls. ...

How do I use Python to make a HTTPS request to this? and get the ACCESS_TOKN back?

https://graph.facebook.com/ I need to make an HTTPS request to that. And then get the params back. How to do that? ...

ASP.NET MVC - how to modify requested URLs?

The baidu spider seems to be adding ¤ to end of some crawled urls (it seems that it happens with urls containing single unicode character as the last character) The baidu-requested url looks like this: site.com/abc/ä¤ while site.com/abc/ä is the valid url and as linked from many places on my site. The internal problem is that a diff...

java.io.FileNotFoundException for valid URL

Hello. I use library rome.dev.java.net to fetch RSS. Code is URL feedUrl = new URL("http://planet.rubyonrails.ru/xml/rss"); SyndFeedInput input = new SyndFeedInput(); SyndFeed feed = input.build(new XmlReader(feedUrl)); You can check that http://planet.rubyonrails.ru/xml/rss is valid URL and the page is shown in browser. But I get e...

Python: replace urls with title names from a string

Hello I would like to remove urls from a string replace them with their titles of the original contents. For example: mystring = "Ah I like this site: http://www.stackoverflow.com. Also I must say I like http://www.digg.com" sanitize(mystring) # it becomes "Ah I like this site: Stack Overflow. Also I must say I like Digg - The Latest ...

How do I open a web browser from a .NET Program? Process.Start() isn't working?

I have a URL and I want to launch it in the default browser. I've tried two methods: Process.Start("http://stackoverflow.com"); ... and the one detailed in this other question using ShellExecute. In both cases I get the error: Windows cannot find 'http://stackoverflow.com'. Make sure you typed the name correctly, and then try again....

How to filter current url using php

Example current URL http://www.domain.com/subdomain/install/finish.php I use this code to get the current URL. $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; Now I want to get the URL looks like http://www.domain.com/subdomai...

Detecting .com / .co.uk etc etc

Hey all! I currently have a preg_match to detect http:// and www. etc..... but I want to detect domain.com or domain.co.uk from a string example string: "Hey hows it going, check out domain.com" And I want to detect domain.com What I want is to detect any major domains form this string i.e. .com .co.uk .eu etc... from the fo...

Url for SEO Link

Hi, i need a function (c#) or regular expression that makes me a nice URL out of a string. (and replaces invalid characters) Something like here on stackoverflow.. example: Short URL or long URL for SEO -> short-url-or-long-url-for-seo Thanks ...

Get IFrame parent url or referrer using javascript or php

I am creating a widget that would load in a IFrame and users will be able to place the widget on their own website. How would I get the URL of the website that is using the IFrame in javascript and/or PHP? The IFrame loads a php file. I have tried "parent.top.location.href" and "parent.document.referrer" in the IFrame page but that is u...

HttpURLConnection timeout question

I want to return false if the URL takes more then 5 seconds to connect - how is this possible using java? Here is the code I am using to check if the URL is valid HttpURLConnection.setFollowRedirects(false); HttpURLConnection con = (HttpURLConnection) new URL(url).openConnection(); con.setRequestMethod("HEAD"); return (con.g...

Greasemonkey script to change a variable in the URL

On some pages in Google Analytics, there is a variable shown in the URL. The default value is 10. The URL always looks something like this: ...&trows=10&... is there a way to change that to trows=100, so that the number of rows displayed by default is 100? Thanks ...

What's my best bet for replacing plain text links with anchor tags in a string? .NET

What is my best option for converting plain text links within a string into anchor tags? Say for example I have "I went and searched on http://www.google.com/ today". I would want to change that to "I went and searched on http://www.google.com/ today". The method will need to be safe from any kind of XSS attack also since the strings a...

Image before URL in browser with asp.net

Hi All, I am using asp.net with C# [3.5]. I want to display Image before my URL in browser, like IE and mozilla used to have. I want to display my custom image. Please help. Thanks in advance ...

URL Rewrite problem

Hi, I did a .htaccess that change urls like www.site.com/sell.php to www.site.com/sell. Sell page exists at my / and it works fine. The problem is when i try something like www.site.com/sadasdasdasdadsdfgfds, because "sadasdasdasdadsdfgfds" doesn't exist. I receive a 500 Apache's error. This is my .htaccess file: RewriteEngine On Rewri...

What does "?ref=ts" mean in a FACEBOOK APP url

When Facebook drives traffic to an app, they often append &ref=whatever to the query string. This is useful for figuring out which integration points are working or not. I've figured out what some of these mean. For example: ref=bookmarks - the user clicked on a bookmark. ref=game_my_recent - the user clicked on the upper portion of th...

How do you access URL text following the # sign through Java?

Using Java (.jsp or whatever) is there a way where I can send a request for this page: http://www.mystore.com/store/shelf.jsp?category=mens#page=2 and have the Java code parse the URL and see the #page=2 and respond accordingly? Basically, I'm looking for the Java code that allows me to access the characters following the hash tag. T...

Url convention: article/1234/article-name vs articles/1234/article-name

I asking just for your opinion, of what make more sense. Currently, this is my design: www.site.com/articles <-- list www.site.com/article/1234/article-name <-- details www.site.com/article/write <-- write new article Is is make sense too you? or article's make more sense? Can you tell me what ...

open a link in a new tab in the same window

Hi I am making a firefox extension which needs to open a link in anew tab in the same window of firefox. How should i do this? This opens in a new window (replacing the old window): window.location = url; This opens in the same tab window.content.document.location = url Any idea on how to open the url in a new tab? ...

Apache multiple URL to one domain redirect

For the last two day, I've been spending a lot of time to solve my problem, maybe someone can help me. Problem: I need to redirect different url's to one tomcat webbase-dir used for artifactory. following urls should point to the tomcat/artifactory webapp: maven-repo.example.local ; maven-repo.example.local/artifactory ; srv-example/ar...