Exposing subfolders under a WordPress installation
LincolnSo, 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/
Happy blogging 
![]() | About the author:Lincoln Baxter, III is a Senior Software Engineer at JBoss - a division of Red Hat. He is a founder of OcpSoft, the author of PrettyFaces: bookmarking, SEO extensions for JSF, and an individual member of the JavaServerâ„¢ Faces Expert Group. When he is not swimming, running, or playing Ultimate Frisbee, Lincoln is focused on promoting open-source software and making web-applications more accessible for small businesses, individuals. His latest project is ScrumShark, an open-source, agile project management tool. |
Posted in OpenSource

