Solved

IIS 6 - Problems with long URL's- linking to em in emails

Posted on 2006-10-19
5
315 Views
Last Modified: 2006-11-19
I've got a recent issue with long URL's that I sent to people to link them digital pix/jokes that I host on my Win2k3/IIS 6 web server.

The links are long because of the sub directories so they look like


http://dnr.dyndns.org/DigPix/2006/Ireland%20Trip%20April%202006/

When I link them in emails (gmail) to friends they get EXXXXTRA characters added!

so this...

http://dnr.dyndns.org/DigPix/Misc/My%20Dog/Aug%2027%20-%201.JPG

becomes this..

http://dnr.dyndns.org/DigPix/Misc/My%2520Dog/Aug%252027%2520-%25201.JPG

and then the link doesn't open

u can see it's adding the number 25 between the spaces. Annoying

is there an IIS plugin i can get to SHORTEN the URL's?  I'd like to just give out Is this just a gmail issue? odd
I've used TINYURL before to shorten links. that worked well but isn't server side
0
Comment
Question by:GigBits
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
SCDMETA earned 125 total points
ID: 17771839
The problem is that your URLs are URLEncoded twice.

First time through all spaces are encoded to %20.

Orginal Version:
http://dnr.dyndns.org/DigPix/Misc/My Dog/Aug 27 - 1.JPG

Example of first pass encoded version with [ ] around the encoded characters.
http://dnr.dyndns.org/DigPix/Misc/My[%20]Dog/Aug[%20]27[%20]-[%20]1.JPG

Results of first pass encoding.
http://dnr.dyndns.org/DigPix/Misc/My%20Dog/Aug%2027%20-%201.JPG

The second time through all percent symbols % are convert to %25.

Example of second encoded version with [ ] around the newly encoded characters, which happen to be the % symbols created by the first encoding.
http://dnr.dyndns.org/DigPix/Misc/My[%25]20Dog/Aug[%25]2027[%25]20-[%25]201.JPG

Resulting in the double encoded URL
http://dnr.dyndns.org/DigPix/Misc/My%2520Dog/Aug%252027%2520-%25201.JPG

How are you putting the link in your emails?  Try inserting your unencoded version.  http://dnr.dyndns.org/DigPix/Misc/My Dog/Aug 27 - 1.JPG
0
 
LVL 6

Expert Comment

by:bigphuckinglizard
ID: 17772062
Spaces in filenames are the root of all evil ;-) could you just rename all the files so a ' ' becomes a '_'?
0
 

Author Comment

by:GigBits
ID: 17773019
I am generating the links from the Internet Explorer address bar, I didn't know I could just put in the unencoded version though, that works, will test and report back
0
 
LVL 6

Expert Comment

by:SCDMETA
ID: 17773113
I agree that spaces can create problems, specifically when trying to communicate the URL to another user.  Even Experts-Exchange has a problem correctly creating the link with spaces in it:

Orginal Version:
http://dnr.dyndns.org/DigPix/Misc/My Dog/Aug 27 - 1.JPG

Most email clients will incorrectly hyperlink a URL with spaces and you have to perform specific steps to have the link inserted correctly into an HTML email.  

I use Thunderbird as an email client.  It has a create link command, where you specify the text of the link , and the URL.   Good luck
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Microsoft Edge 9 80
WPF issue with Trigger 2 67
logo disappears on cell phones 5 33
Urgent Help with HTML CSS Positioning 9 21
Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Read about why website design really matters in today's demanding market.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now