When I create a post/question like this one for example. How does stackoverflow use it? I mean, does it create a new page for the question or does it turns it into pieces and puts the pieces together on a single dynamic page?
I've read that creating a new page would be bad because it would put a heavy strain on the server. But its good for SEO right?(not sure) on the other hand, generating a dynamic page is a lot less heavy on the server, but I'm not sure when it comes to SEO.
So how do websites like stackoverflow handle the content? Generate new pages or just a single dynamic page? or maybe they do something else that I just haven't read or heard of?
Its all generated dynamically and URL is just made keyword rich, for it search engine friendly.
Its done in most web servers by rewriting the URL so that a search engine could find the important keywords within the URL
In Apache HTTP server, a rule in .htaccess
file would rewrite the request URLs to convert into actuall parameters that the processing script can use
for e.g. a URL like this
http://www.example.com/forum-name-3/topic-name-28/22/
would be converted to
http://www.example.com/index.php?forum=3&topic=28&page=22
by using this simple rule in .htaccess
RewriteRule ([0-9A-Za-z-\+._]+)-([0-9]+)/([0-9A-Za-z-\+._]+)-([0-9]+)/([0-9]+)/$ ./index.php?forum=$2&topic=$4&page=$5
If you are using Apache HTTP server, then you can find all fancy things here
You'll need to make the rules as per your needs, the example above is just for the sake of explaining how it works, so it may need some tweaking for making it work.