htaccess redirect to subfolder with exception


Staff member
I've searched quite a lot without finding a solution.

I have a wordpress blog in
and something else in

What I'm trying to is that every request gets redirected to the WordPress. Except those to
and its child directories. I also want the access to the blog to be rewritten. Few examples to make it clear:

/ --> /_wp/

/ablogpost --> /_wp/ablogpost

/other --> /other

/other/bingou --> /other/bingou

I've tried a few things but what seems the most logical to me is:

<li>don't touch the .htaccess of /_wp/ and of /other/</li>
<li>edit the .htaccess of the root '/' by adding:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteCond %{REQUEST_URI} !^(/other|/other/.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?(.*)$ /_wp/$1

If you could tell me what is wrong there it would be great!


After changing the index the subfolders were still not working here was my .htaccess back then:

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
&lt;Limit GET POST&gt;
   order deny,allow
   deny from all
   allow from all
&lt;Limit PUT DELETE&gt;
   order deny,allow
   deny from all
# BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
# END WordPress

<h1>EDIT 2</h1>

In the end it was a host problem thanks for your help though! Your answer works just well