Jump to content

.London Domains - £4

C# .aspx rewrite to .html

C# HTML Visual Studio ReWrite

  • Please log in to reply
3 replies to this topic

#1 wayne1986d

  • Member
  • Newbie
  • 2 posts

Posted 15 May 2013 - 11:09

Hello All,


I am currently working on a solution in Visual Studio using C# masterpages and user controls.


My .html website pages rank well in Google and don't want to have to try and get .aspx pages into Google.


When working previously with a Developer they used a rewrite system converting all .aspx pages to output as .html pages so that within my working solution I would use the file extension of .html.


Could somebody please help me with this?


Many thanks,


  • 0

#2 Renaissance-Design

  • Global Mod
  • Code Poet
  • 1,542 posts

Posted 15 May 2013 - 11:42

Are the filenames all the same apart from the extension?




Simplest solution


Best solution would be to implement a front controller pattern and 301 redirect all your URLs so


mydomain.com/my-page.html becomes mydomain.com/my-page/ rather than mydomain.com/my-page.aspx


That's a much more forward-thinking solution, because it allows the site to even change server-side language in the future without breaking your URLs.

  • 0

Chris Cox is a freelance web designer & developer based in Bridgend, South Wales. You should definitely follow @RenaissDesign on Twitter.

Need a blank theme for a WordPress project? Check out Tabula Rasa. Was this post helpful? Buy me a beer.

#3 wayne1986d

  • Member
  • Newbie
  • 2 posts

Posted 15 May 2013 - 12:08

Yea all filenames have the .aspx entension within different directories.







Currently have these indexed as .html.


Thanks for the link and 301 redirect suggestions, greatly appreciated.

  • 0

#4 divyesh.padamani

  • Member
  • Newbie
  • 35 posts

Posted 14 February 2017 - 11:32



In your Application If you have working with ASP.net then there is two type of file  .aspx and another is .cs file. Into your aspx file is completly Design file and logic should be the in .cs file.


So,At the run time always its take .aspx file and For your knowledge browser is only understand .html page so its always display .html file.




  • 0

Divyesh Padamani

Software Developer - iFour Technolab Pvt. Ltd.

Also tagged with one or more of these keywords: C#, HTML, Visual Studio, ReWrite

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users