Exposing subfolders under a WordPress installation
So, this is going to be a short-relatively non-technical post, but having just run into the problem of exposing a subdirectory when WordPress is installed into the root directory of a typical DreamHost or GoDaddy style account, I found the need, so here’s the answer if anyone else needs it.
I ran into this issue because we needed somewhere to put the OcpSoft PrettyFaces/PrettyTime APIs, which of course needed to be on the OcpSoft website. Yet, WordPress is installed in the root directory, which meant that all requests were going to be sent to the wordpress index.php file (thanks to apache .htaccess)
And that’s it! The folder contents will be exposed for browsing:
Examples of exposed folders here:
http://ocpsoft.com/api/
http://ocpsoft.com/repository/
http://ocpsoft.com/xml/
The solution is simple (as we like it…)
In order to expose a folder under the recent wordpress implementations — add a .htaccess file in each directory you want to expose, and place inside the following line:/folder/.htaccess
Options +Indexes |
Happy blogging 🙂
Posted in OpenSource
Does not work for me. 🙁