How can I “simulate” directories on a server?

Say I go to example.com/testing/1/2/3. I don’t want it to request the directory “/testing/1/2/3”, I want it to pass that part of that URL to a script (presumably example.com/index.php).

I don’t know if it works exactly as I described, but the reason I ask is because in WordPress, in “Permalink Settings”, you have the option to change the URL scheme to something like http://example.com/2013/08/sample-post/, so that when you navigate to that URL it shows you that post. However, it doesn’t create any of those directories, or any directories for that matter. I’m wondering how that works because I’d like to use it in other places. It seems fairly commonplace (I doubt URL shorteners have hundreds of thousands of directories at the root of their domain and probably use this instead), but I’m just not sure what it is called or how to find more information about it and was hoping someone could point me in the right direction. Thanks.

Related posts

Leave a Reply