totallyNotLizards
totallyNotLizards

Reputation: 8569

how to make a directory in wordpress accessible from the web

I'm working on a bit of a frankenstien wordpress site at the moment, it incorporates a few things including a different CMS that needs to be accessible from outside without WP rewriting URLs or anything.

What I want is to be able to access domain.com/myFolder with a browser and let it go through unmolested (and any subsequent requests to anything inside that directory). Anything else gets the normal treatment - e.g viewing a post on domain.com/2011-02-02/my-post will serve up post content.

Here is the .htaccess file wordpress is currently using:

# Switch rewrite engine off in case this was installed under HostPay.
RewriteEngine Off

SetEnv DEFAULT_PHP_VERSION 53

DirectoryIndex index.cgi index.php

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /domain.com/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /domain.com/index.php [L]
</IfModule>

# END WordPress

I don't understand .htaccess in the least, so can anyone point me in the right direction?

Upvotes: 0

Views: 1004

Answers (1)

soju
soju

Reputation: 25322

You can use a RewriteCond to disable rewrite for myFolder :

RewriteCond   %{REQUEST_URI}  !^myFolder/.*

Or a blank RewriteRule :

RewriteRule ^myFolder/ - [L]

Insert one of these rules before RewriteRule . /domain.com/index.php [L]

Not sure about the path since I need more informations about your directory structure.

Upvotes: 1

Related Questions