It's well-past time for The Office's websites to be upgraded and for the main public one, I'm considering migrating the existing .Net 1.1 ugliness up to ASP.Net MVC.
The only real doubt I have is over the fairly extensive work on SEO that has been carried out on the site.
What considerations should I bear in mind regarding SEO when moving from an old webforms site to MVC urls?
If your question is only about URLs, then the answer is that redirecting the old URLs to new ones with a permanent redirect (301) should do the trick - search spiders should update the results to new links without any SEO hit.
There will be other factors to consider as well - e.g. changed HTML structure of pages (I hope you are not going to mimick the output of the old ASP.NET in your new web app :)).
I would take a long hard look at routing. That's going to be the key to getting the SEO working as desired on the URL's. You may also want to have html helpers for formatting the rich url's.
You should consider your old links using either a) standard web forms with routing or b) making a large routing table that handles request for all of those old URLs that have already been cached / scraped by Google, Yahoo, Bing, etc. If, as you say, you already have some good SEO in place, you don't want all of those links to suddenly stop working.
Related
I am working on a mobile site that uses .aspx for the pages; however, I am transferring information from older .asp pages. These .asp pages are reading database connections, and I am not clear how to convert these into .aspx pages without running into config errors that are unclear to me in fixing.
Is it bad practice to mix .asp and .aspx pages in a site? If not, how can I learn to better understand the conversion differences from .asp database connections to .aspx? This is the only obstacle I have going on at the moment with this site, and I would love to find a solution soon as I've been stuck here for a while.
The site works, but I would like to be consistent with the .aspx set up in pages. I appreciate any help you may have to offer, thank you.
You can absolutely mix ASP pages with ASP.NET pages. I've done it for internal sites where we didn't have time to redesign, but needed to add some functionality. Note that you can't share session state between the two types of pages (I worked around this using cookies) but the two pages can live together in the same web site without an issue.
Often ASP pages will have database connections kept in the global.asa file or perhaps in an include file, or even right within the asp pages themselves. It would be helpful as you migrate functionality to have all those connections in one logical place.
There is no straight conversion to ASP.NET from ASP, and if you don't have much experience yet with ASP.NET it would be worthwhile to explore some samples / tutorials to get an understanding of how an ASP.NET Web site works. There are lots of options for how you connect to your database. Have a look at www.asp.net to learn about them.
You can have the two running together. It's not necessarily a bad practice to mix the two, but here can be some technical things that you'll have to work out. Since it sounds like you're trying to convert a classic ASP site to ASP.NET, if there are not too many pages, I'd probably try to figure out the conversion issues so that all of your pages are running on ASP.NET.
Otherwise if you do want to run ASP and ASP.NET side by side, if your website has session state or authentication and you need that shared by both asp and asp.net pages, then you need to ensure that you have a strategy to handle that kind of stuff. This thread details session management issues to consider when running ASP with ASP.NET, for example: Classic ASP and ASP.NET Integration.
I'm newbie in angular so i have two questions on AngularJS routing. Deeply sorry if this has been answered. tried a brief search, didnt find exact match.
I get the idea of SPA, the cost of asp.net server round trip,
however, what's a valid real world scenario that make best use of
both server side routing and client side routing together? or simply
give up the asp.net mvc routing at all?
If partial routing rules
defined on both side, isn't it a bit messy?
well, that depends on what you need I saw some people doing a mix of routes between angular and MVC, you can take a look to he boilerplate and hot towel projects for asp.net and angular combo take them as reference, both are like starter kits.
In my personal opinion (and this is subjective), I prefer to use a RESTFul architecture / SPA let angular do the routing and have web API or service stack as a middleware very much like the mean.js approach for me it's a cleaner and more natural for a SPA application.
take a look to this article that talks about rest API and some best practices.
I don't know if there's a perfect answer since it all depends on the project you're working on and the preferences of the dev team. I personally like keeping some of the MVC concepts (mvc views, routing, etc.) and just using angular for a given page's functionality. I don't make use of the angular routing at all. Obviously it would be a different story if you were trying to create a full SPA.
But I find that in a lot of cases (especially if working on an existing app written in MVC) you can introduce bets and pieces of angular without taking it all the way. If you're trying to get rid of page redirects entirely and want a full SPA experience then you should probably use a service approach instead as already suggested (if you want to stay with the Microsoft stack, Web API is a good option).
so I just migrated a bunch of my old web sites to .net mvc and turned them loose on the net last week.
I optimized them as best I know how for SEO but I'm noticing that NONE (not a single one!) of my sub pages is being displayed on google...only my home pages.
I created controllers for the products to try and give them plugs for each page.
ex:
http://www.mywidgets.com/widget_to_make_coffee/coffee_making_widgets
ironically, google is still showing some of my sub-pages from the old site, which I have redirecting to the new, but I fear that when it fully updates its index, I will lose that placement and not gain the placement from my new stuff as it's no-where to be found...
is this bad practice? Should I have structured everything off of the home controller?
Should I have structured everything off of the home controller?
No. Something else it's going on.
One of the advantages of ASP.NET MVC is that you can de-couple your routes (URLs) from the logic of your code (models/views/controllers)
The only important thing is that you have something at the old urls passing a 301 redirect to the new urls. Google will fix itself pretty quickly after that.
Depending on how many incoming links you've got, you might end up keeping the redirector up permanently.
I have a project that will basically be a large brochure html website. Although some content could possibly be database driven in the future. I use ASP.NET MVC for any database driven websites usually, but not sure whether to use it for brochure html websites.
You'd probably want to use Master Pages even if the content is static. Might as well use MVC to keep headers and footers consistent across the site. (Same goes for any language, really.)
You host only plain old html files in it for now. If the need arises for database-driven content, ASP.NET MVC's routing options make it easy to switch to a dynamic site without breaking the links.
We used the same approach for setting up a dummy website for SEO purposes until the real app was developed and the switch to dynamic content was effortless.
The good thing about ASP.NET MVC (as apposed to Webforms? I assume you're asking) is that you can just use basic html and have a designer design up brochure required. If this needs to be more "dynamic" at some stage with forms or CMS etc, using the existing plain html will be easier.
Also if you're using MVC already its a no-brainer...
Danny,
it's possibly also a choice over whether your project sponsor is wanting to pay for windows hosting or whether they go down the linux route. if you know for sure that the site would NEVER be required to take data from a database then you could actually create an app in mvc (your developer app) and then have that app generate the 'flat file' site out to html files. that way, you could store the elements that make up the content in your developer database and regenerate the entire site when required. This approach would reap dividends - for example you decided to add some jquery across the site, then this would do it all in a single hit.
this way of generating flat sites would mean that you could in theory have an engine that you used for multiple clients, changing only the css and content as required.
just my tuppence worth...
jim
I am rewriting some of sites in MVC.
I am concerned about old links out there, some I know about and some I don't.
I am looking for suggestions and code sample on how to make sure that my known and unknown links are not dead. What are your choices?
I would eventually like to phase out my old links. I hope to do this by notifying my users coming from old links about the new links.
I want to start off with something simple, as I am still learning MVC.
Another post suggested Managed Fusion URL Rewriter and Reverse Proxy.
I am the developer of the URL Rewriter you mentioned. If you would like help, please contact me as suggested in the ReadMe.txt file. What you are asking for is not out of the ordinary and can be easily accomplished using some very basic rules.
Well you brought up two important points. You want to notify your users about the new links, you biggest user your probably care about at this time is Google. You can address this concern with Google by doing a 301 Permanent Redirect. For example, this is how you would do it with the URL Rewriter syntax.
RewriteRule ^/(old-url.*)$ /new-url$1 [R=301]
The R=301 does the permanent redirect. The second your known and unknown links. For your known links you just need to map them to the correct part of your new application using the above rules. Depending on how many old url's you have you probably want to make the rewrite rule generic so one will catch many old url's.
For the unknown links you probably want to do one of two things, look over your server logs or analytics for anything important, and map those as appropriately to the correct part of your new code.
Then to make sure all the others don't totally go away you can redirect them to either your home page, internal site search, or just a generic page explaining that your site has been updated and this link is no longer in use.
Again please contact me with questions. The Managed Fusion URL Rewriter and Reverse Proxy will work perfectly with any .NET website (including MVC) on IIS 6 and any type of website on IIS 7 including PHP, Ruby, JSP, and Classic ASP.
Have a look at this article - http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
SUMMARY:Tip/Trick: Url Rewriting with
ASP.NET.
http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx
SUMMARY:Blog - ASP.NET MVC Framework
(Part 2): URL Routing.
If what you need is pretty URLs (or Search Engine Optimized), you can do it without rewriting your application. Check out URL Rewrite Module for IIS 7:
http://www.iis.net/extensions/URLRewrite/
It is Microsoft supported and supports URL rewriting and also response content rewriting (to fix your application links for example).
Daniel Vasquez Lopez.