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.example.Com/My_Custom_Search_Phrase/
or:
http://www.example.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.
Well, most web servers 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-existent 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".