In my article site some users decided to have their eMail address instead of user name The problem starts when i'm trying to redirect to a page using RouteData and the URL ends with ".com" , for example "example@gmail.com" is a valid username so his personal page will be
http://www.mysite/user/example@gmail.com
As you can see the it gets redirect to home page and relative path gets messed up, so images doesn't show
Can someone tell me why browsers don't like routedata in their url ending with .com ? If you try ".net" or ".org" it will work, that's the issue with ".com" ?
In Windows, the .com extension is used to denote a type of executable file. Your question is tagged as asp.net - so I assume you are using IIS. IIS does not manage virtual directory names containing executable extensions such as:
.vbs
,.com
,.exe
, etc.When a virtual directory name ends with an executable extension (such as .com, .exe, .dll, or .sh), the files in this virtual directory cannot be viewed with a Web browser. For more info, see here.
One option you have is to simply replace
.
with an underscore_
for personal pages. So your example above would be:http://www.mysite/user/example@gmail_com