• Hi,

    I’m trying to have a subfolder to put my own php files. (ie: mySubdirectory)

    My htaccess looks like this:

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

    I read everywhere, and people are saying to simply put
    RewriteCond %{REQUEST_URI} !^/(mySubdirectory|mySubdirectory/.*)$
    in there but its not working. I tried for 3 hours and im losing it lol

    My htaccess now looks like this.
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_URI} !^/(mySubdirectory|mySubdirectory/.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    I also tried putting an htaccess fil in the mySubdirectory folder like this:
    <IfModule mod_rewrite.c>
    RewriteEngine off
    </IfModule>

    And that didn’t work either.

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You need to actually name the sub-directories.

    Thread Starter tzzoug

    (@tzzoug)

    i did name the subdirectory “subDirectory” in this scenario.
    I will change it later, but i just put it that way so its easier to understand (i guess it caused confusion more than anything lol)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Subdirectory Exclusion from htaccess problem’ is closed to new replies.