Last post May 13, 2014 12:30 PM by Mikesdotnetting
May 13, 2014 09:32 AM|Chris17|LINK
Please is there anyway I can hide url details from users. Example: instead of "www.any.com/Register.cshtml", the user will see "www.any.com/Regiseter"
May 13, 2014 09:37 AM|Ashim Chatterjee|LINK
You can try
Url Rewriting techniques.
May 13, 2014 09:46 AM|Rion Williams|LINK
You'll use a process called URL Rewriting to handle this, which involves creating the appropriate mappings so that your application / site knows that the ASPX portion of the address or page name is implied.
Scott Guthrie has an excellent tutorial and walkthrough on the topic that you might want to consider reading over :
The above post covers 4 different methods for handling rewriting URLs and I am sure that more than one of them are bound to suit your needs. If you need some additional resources on the topic or want to know a bit more about it (and what is going on),
I would recommend the following resources :
May 13, 2014 11:53 AM|GmGregori|LINK
Maybe my answer is too simplistic, but in the link urls of a Web Pages site you could omit the cshtml extension without problems.
If your link is
the user is redirected to the Register.cshtml page but in the url field of the browser he sees only
May 13, 2014 12:30 PM|Mikesdotnetting|LINK
GmGregori has provided the best solution to your question as far as the Web Pages framework is concerned. You don't need Url Rewriting. If you need something a little more powerful than just losing the extension, you can use a Helper from Nuget called Routing
for Web Pages.
Here are some articles on the inbuilt URL management that GmGregori mentioned and the routing package: