June 29th, 2009 by Lincoln Baxter III

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)

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
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/

Happy blogging 🙂

Posted in OpenSource

One Comment

  1. Emil says:

    Does not work for me. 🙁

Reply to Emil




Please note: In order to submit code or special characters, wrap it in

[code lang="xml"][/code]
(for your language) - or your tags will be eaten.

Please note: Comment moderation is enabled and may delay your comment from appearing. There is no need to resubmit your comment.