If you want to try using Flask, you will use what are called "routes" to define the various pages where you content can live.
In your example, they have defined a route called /search
, which will then serve up some content.
Here's another example in the Flask documentation: http://flask.pocoo.org/docs/0.10/quickstart/#routing
It isn't the same as what you might be used to if you ever made a website using FTP and plain old html, where you might have a URL like www.mywebsite.com/code/ranjan.html
. In that case, the URL actually was pointing to folders and files.
But the "new" way (the good, proper way) is to use URL routing with nice clean URLS to point to your content.
You might also like to try to read the section in the Django documentation about url dispatching to give you more ideas. (Django is another Python framework for making websites.)
Edit: As to your question about .htaccess, yes, you can do URL rewrites using .htaccess, but Flask, Django and other web frameworks will save you from needing to do that. Here is an example.