Solved

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

Posted on 2006-10-19
5
320 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

728 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