Jump to content

.London Domains - £4
Photo

C# .aspx rewrite to .html

C# HTML Visual Studio ReWrite

  • Please log in to reply
3 replies to this topic

#1 wayne1986d

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,

Wayne


  • 0

#2 Renaissance-Design

Renaissance-Design
  • Global Mod
  • Code Poet
  • 1,570 posts

Posted 15 May 2013 - 11:42

Are the filenames all the same apart from the extension?

 

Edit:

 

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.

Was this post helpful? Buy me a beer.


#3 wayne1986d

wayne1986d
  • Member
  • Newbie
  • 2 posts

Posted 15 May 2013 - 12:08

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


Example:

page.aspx

pagetwo.aspx

 

folder/pagetwo.aspx

 

Currently have these indexed as .html.

 

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


  • 0

#4 divyesh.padamani

divyesh.padamani
  • Member
  • Newbie
  • 35 posts

Posted 14 February 2017 - 11:32

Hi,

 

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.

 

 

THANKS


  • 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