url

stripping an url from a text

How do I get to strip a url and put it back in the same position? ...

Can an "SEO Friendly" url contain a unique ID?

I'd like to start using "SEO Friendly Urls" but the notion of generating and looking up large, unique text "ids" seems to be a significant performance challenge relative to simply looking up by an integer. Now, I know this isn't as "human friendly", but if I switched from http://mysite.com/products/details?id=1000 to http://mysite.co...

rules for slugs and unicode

After researching a bit how the different way people slugify titles, I've noticed that it's often missing how to deal with non english titles. url encoding is very restrictive. See http://www.blooberry.com/indexdot/html/topics/urlencoding.htm So, for example how do folks deal with for title slugs for things like "Una lágrima cayó en l...

Manipulate the session history with JavaScript

I need to delete the latest browser history entry for this reason, but any other functions exposed by JS that manipulate (add/remove) history entries for the current page/tab, are also welcome. ...

Modify the URL without reloading the page

Is there any way I can modify the URL of the current page without reloading the page? I would like to access the portion before the # hash if possible. I only need to change the portion after the domain, so its not like I'm violating cross-domain policies. window.location.href = "www.mysite.com/page2.php"; // sadly this reloads ...

Accessing Jump Links (the part of the URL after a hasch character, #) from the code behind

Hi! Anyone know if it's possible to access the name of a jump link in c# code? I'm doing some url Rewriting stuff and I'm thinking I might not be able to see that part of the URL. So basically, my URL looks a little something like this: http://www.mysite.com/Terms.aspx#Term1 And I want to access "Term1". I can't see it in the Se...

How do I form complete URLs from incomplete URLs found in a web page?

I can retrieve the text of a web page, let's say http://stackoverflow.com/questions with some real and made up links: /questions /tags /questions?sort=votes /questions?sort=active randompage.aspx ../coolhomepage.aspx Knowing my originating page was http://stackoverflow.com/questions is there a way in .Net to ...

Use the get paramater of the url in javascript

If I am on a page such at http://somesite.com/somepage.php?param1=asf in the javascript of that page, I would like to set a variable to the value of the paramater in the GET part of the url so in javascript: <script ...> param1var = ... // ... would be replaced with the code to get asdf from url </script> What would "..." be?...

passing session id via url

I'm trying to get my script to use url session id instead of cookies. The following page is not picking up the variable in the url as the session id. I must be missing something. First page http://www.website.com/start.php ini_set("session.use_cookies",0); ini_set("session.use_trans_sid",1); session_start(); $session_id = session_id();...

How to build a query string for a URL in C#?

A common task when calling web resources from a code is building a query string to including all the necessary parameters. While by all means no rocket science, there are some nifty details you need to take care of like, appending an & if not the first parameter, encoding the parameters etc. The code to do it is very simple, but a bit t...

Asp.NET / VB.NET: Getting the path from the URL / URI ?

Hello, Say I have a project that I am deploying at www.foo.com/path1/default.aspx and www.foo.com/path2/default.aspx What would be the most reliable way to know if I was in the folder "path1", or "path2"? Can I grab that directly, or do I need to split() somehow on the Request.Url.AbsolutePath, or... ? I just want to change co...

How can I use javascript to convert relative href attributes into absolute paths?

I have a template that gets screenscraped from an outside vendor and need to include absolute paths in the navigation so the externally hosted content will properly link back to our site. Right now the page/template is driven by a global menu app written by our back end development staff... so anyone who updates our site goes in and cha...

regular expression for url

what is the regular expression for a url without 'http://www.'? i'd like to validate whether it is uri or not when the user enters the uri name ...

how to trigger a jquery function just with the url?

Hello everyone.. this is my first question.. so, here we go. i have a site, 100% xhtml/css with some ajax functions thanks to jquery. te problem is.. for all the "sub pages".. the url remains the same (index.php).. my question is.. does jquery allow some url parameters to trigger an specific function? example: www.mypage.com -> hom...

Extracting a URL in Python

In regards to: http://stackoverflow.com/questions/720113/find-hyperlinks-in-text-using-python-twitter-related How can I extract just the url so I can put it into a list/array? Edit Let me clarify, I don't want to parse the URL into pieces. I want to extract the URL from the text of the string to put it into an array. Thanks! ...

How can I convert URLs in text to HTML links?

I'm writing a forum-type discussion board in Perl and would like to change automatically http://www.google.com to be an HTML link. This should also be safe, and err on the side of security. Is there a quick, easy, and safe way to add links automatically? ...

mod_python publisher and pretty URLs

Hi all, I am new to Python (I am getting out of PHP because of how increasingly broken it is), and I am racing through porting my old code. One thing: I have a file /foo.py with functions index() and bar(), so, with the publisher I can access http://domain/foo/bar and http://domain/foo as the documentation suggests. How can I have it ...

REST - supporting multiple possible identifiers

For the site I am working on, we are in the process of improving our URLs for one type of resource - specifically, moving away from numerical IDs toward unique, descriptive strings. A similar example would be switching from identifying users by numerical database ID to identifying them by username (not our specific case, but analagous). ...

Short URL conflict. Prefer the item, or list of items?

I'm constructing a site with tutorials and other things. I'm trying to find a good URL structure. However, I have a conflict: tutorials/ <-- list of all tutorials tutorials/a-very-cool-tutorial <-- points to the very cool tutorial tutorials/java <-- a list of tutorials tagged java tutorials/java+soap <-- a list of tutorials tagged java ...

Django URLs - How to pass in multiple caterories via the clean URL without the need for ?

Hi, I want to stay way from GET params. Don't want to use POST and I have at least two different categories to build the URL for. The visitors are first asked to choose a location wich can be one of, for example: http://foo.com/United-States/ || http://foo.com/United-States/California/ || http://foo.com/United-States/California/San-...