I hadn't really thought about the answer to this question, but I figured it was worth discussing since after a bit of trial and error I've finally found what works great for mounting a curtain inside a doorframe.
There are a few ways to go about replacing a door with a curtain. First, if you can, and if you want, you can just mount standard drapery hardware in front of the door opening, as in the image above.
If you truly want the curtain to sit inside the door frame, you can use standard drapery hardware again—it's just a bit harder to find the hardware that will allow you to have a rod running between two wall sockets.
I diy-ed my version a bit because I didn't want to hunt down the drapery hardware required to fit between two walls or a doorframe. As I mentioned, it can be a bit hard to find. I also didn't mind doing something different, because I love bamboo but bamboo drapery hardware can be pricey. Here's something close to what I used. You might be able to find yours at a local discount store. I found a bamboo pole in the garden section, probably meant for staking, but perfectly good as a curtain rod. And I spent under $20 on all the materials (including rings, which you may or may not want or need to use, depending on what kind of header your curtain has).
You can then slide your curtain right through the rod and hang, if you curtains have a pole pocket or grommet header. See below.
Or use clip rings and slide the rings on. This is how I did it for my shower curtain.
loft & cottage
But there as many ways to do this project as there are ways to hang something and places to hang fabric. Here are a few decorative, pretty ideas I love.