homepage Welcome to WebmasterWorld Guest from 54.198.42.105
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
Hyphens turn to %2
lozmatic




msg:3100327
 11:41 am on Sep 28, 2006 (gmt 0)

Hi,

I have a folder that looks like this: www.mysite.com/this-folder

When I browse to it I get www.mysite.com/this%2folder

Is this standard behaviour for sites in .NET

Can anything be done to prevent the change?

Thanks,

Loz

 

Bluesplinter




msg:3100346
 12:16 pm on Sep 28, 2006 (gmt 0)

I've noticed the same thing on some sites. To prevent it, add a terminal / to the URL, like this:

www.mysite.com/this-folder/

That prevents the behavior you noticed on IIS. What I don't know is why this happens. Something in the IIS <-> ASP.NET interaction tries to encode the dash in a non-slash-terminated URL, but not if there is a terminating slash. It may have something to do with IIS not having to redirect a slash-terminated URL.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved