I am looking to dynamically submit images to web pages with htaccess based on the file name in the url. I usually use a nested directory structure on my website to serve a dynamic URL based on pseudo-directory names. In this case, I would just like to request the file name (sans extension) and pass it to a PHP script so that:
/images/foo.jpg
becomes
/images/index.php?image=foo
and also let existing jpg images in this directory be served. I am sure this is easy, as I was able to accomplish some pretty cool things with htaccess, but not this one. Thanks.
Lucas source share