0

I don't even really know how to ask this question or what this would be called or if it's even possible. I've tried searching but I guess I just can't word the question properly.

What I'm trying to do is have a URL, say mydomain.com/blog/2012/12, but without the folder structure on my server public_html/blog/2012/12/index.php

Well, public_html/blog/index.php exists, but for the rest, I would like when visitors go to the page mydomain.com/blog/2012/12, for the web site to load an index.php file from somewhere else on the server, and show blog archives for December 2012 without a 404 page coming up because that folder doesn't actually exist.

ie, I don't want to have to create folders for every year/month.

Is this possible? I'm sure it's possible, I just can't figure out how to search for this particular topic.

msturdy
  • 9,343
  • 8
  • 38
  • 52
clearmend
  • 136
  • 8
  • 1
    Hi, I think it's commonly referred to as `routing`.. Lots of frameworks have it built it (see http://laravel.com for example).. otherwise check out this question: http://stackoverflow.com/questions/15392024/is-there-an-standalone-php-routing-library – msturdy Jan 24 '14 at 11:19
  • As this is a relatively common question, the following reference was put together which should be of some help: http://stackoverflow.com/questions/20563772/reference-mod-rewrite-url-rewriting-and-pretty-links-explained/ – Nick Jan 24 '14 at 11:21
  • Excellent! Thank you very much, I was spinning my wheels here. – clearmend Jan 24 '14 at 11:29

0 Answers0