From: Karl on

IIS on Server 2003

Several sites link to our site incorrectly.

http://www.pine-grove.com/Web%2520Calculators/simple%2520loan%2520calculator.htm


(Notice the '%2520' and not just '%20'.)

Anyway, the correct page has dashes. My problem is, how do I create the
"bad resource" so as to map the redirect? I tried creating it with
single spaces:

http://www.pine-grove.com/Web Calculators/simple loan calculator.htm


but using the above URL with '%2520' does not work, though a URL with
'%20' does work.



TIA





From: Andrew Morton on
Karl wrote:
> IIS on Server 2003
>
> Several sites link to our site incorrectly.
>
> http://www.pine-grove.com/Web%2520Calculators/simple%2520loan%2520calculator.htm
>
>
> (Notice the '%2520' and not just '%20'.)
>
> Anyway, the correct page has dashes. My problem is, how do I create
> the "bad resource" so as to map the redirect? I tried creating it
> with single spaces:
>
> http://www.pine-grove.com/Web Calculators/simple loan calculator.htm
>
>
> but using the above URL with '%2520' does not work, though a URL with
> '%20' does work.

%25 is the "%" character, so the file on the server would be called
"simple%20loan%20calculator.htm". (You will, of course, have to replicate
every file in the "Web Calculators" directory in another directory named
"Web%20Calculators".)

Could you get the external links fixed? And maybe consider never ever using
characters which need encoding in URLs? ;) Because the same mistake which
mis-encoded your original URLs will be applied to your mangled addresses, so
you'll have to create new mangled addresses, which will be mis-encoded, so
you'll... ad infinitum.

I can't see anything in the example incorrect URL you gave which suggests
there were dashes in there, because the dash in "pine-grove" has not been
touched,so maybe it came from a previous incarnation of the site.

--
Andrew


From: Karl on

Your suggestion to update the URLs to ones that do not need encoding has
already been done. It's that the new address was fixed to include dashes.

Thanks for the pointer. I'll give it a try.
From: Grant Taylor on
On 06/03/10 10:03, Andrew Morton wrote:
> You will, of course, have to replicate every file in the "Web
> Calculators" directory in another directory named
> "Web%20Calculators".

Traditionally you are correct.

However, you can take advantage of NTFS junctions and make a directory
junction named "Web%20Calculators" that is joined to "Web Calculators".

Take a look at the Junction utility from SysInternals:

Link - Junction v1.05
- http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx



Grant. . . .
From: Andrew Morton on
Karl wrote:
> Your suggestion to update the URLs to ones that do not need encoding
> has already been done. It's that the new address was fixed to include
> dashes.

Sorry, I don't seem to have made myself clear there, what I was trying to
suggest is that you hunt down the external sites which have the faulty links
and get /them/ to correct their links.

> Thanks for the pointer. I'll give it a try.

You may find a URL-rewriting utility more useful, for example you may be
able to use the free version of
http://www.isapirewrite.com/

and get the whole lot done in one step.

--
Andrew