How to name a .aspx page with special characters in the name?
How to name a .aspx page with special characters in the name?
Really simple problem, I wanted to create a .aspx page that has special characters in the URL/file name. Here is a simple general example of what I am trying to do:
http://www.example.com/my-aspx-page-in-C%23.aspx
Note that in this case C%23 means "C#" once URL decoded. I want to do this so that search engines will index the special characters in question.
OK - so how do I do this? I don't think I can create an ASPX page with special characters in the actual file name. And while it is probably possible to create a module of some kind that does this, I was hoping there might be a much simpler way to do this.
Thoughts?
1 Answer
1
You can use friendly URLs in ASP.NET. Here's a tutorial:
https://www.hanselman.com/blog/IntroducingASPNETFriendlyUrlsCleanerURLsEasierRoutingAndMobileViewsForASPNETWebForms.aspx
Please bear in mind that % is considered an unsafe character in a URL. If you are unaware of what this is, please review the concept of unsafe and reserved characters in URLs:
https://perishablepress.com/stop-using-unsafe-characters-in-urls/
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
If you want it only for Search engine indexing then do not bother about url. Instead focus on Meta tags and title. For reference: seo-hacker.com/what-are-meta-tags-and-why-are-they-important
– ManishM
Aug 29 at 6:14