Search Engine Optimization

2019-09-03 14:05发布

Sometimes when I search some phrases in google (e.g "My Custom Search Phrase"), I see some very interesting results. Sites that look like:
http://www.SomeSite.Com/My_Custom_Search_Phrase/ or:
http://www.SomeSite.Com/My_Custom_Search_Phrase.html
Actually, I don't like these sites. I know it's a SEO trick and pages are generated on the fly and are full of ads. But I'm very curious to know how this can be achieved programmatically. Preferably in .Net.
P.S. By saying "Preferably in .Net" I don't mean I want the code in .Net, But some guides about how it can work using .Net technology.

2条回答
ら.Afraid
2楼-- · 2019-09-03 14:42

Well, most webservers have a facility to create "Wildcard" mappings.

That is, they'll take pages that don't exist on your server, and hand that off to the relevant language processor (say, aspnet_isapi.dll in .NETs case).

So, if you write code in the place that gets handed this request for a wildcard (i.e., physically non-existant file), you can pretend that you have it.

This is how URL Re-writing works. Typically you invent some url scheme, like "/article/some-content/identifier", and then you use the identifier to look up the article, while leaving components in the URL such that search engines can "see" that it is "relevant".

Hope this is somewhat helpful. It's a kind of haphazzard overview.

查看更多
淡お忘
3楼-- · 2019-09-03 14:47

Depends what .nET you make.

Classic ASP.NET: you can use them as custom error page (file not found, hammer out your own results).

MVC: a route to a view / controller that accesses the path to see the search phrase, then gets ther esutls and generates the page.

The result can be terrific. If you ahvea good site internal search system this can drive HUGH amounts of traffic. I did a shop once where the search on the customer discussion drive about 70% of the traffic to the pages. Making sense of them is another story (i.e. the result apge must be efficient in getting people to go to the products). This is not even unfair - the discussion resutls were very accurate. Capture rates were VERY good (i.e. people not leaving the site) after opimizing the look to make sure people knew where to go.

查看更多
登录 后发表回答