How to make htaccess exceptions? (2 posts)

  1. perpetualstroll
    Posted 9 years ago #

    Hi. I have a directory called /photos where I am running a script and it outputs index.php, however it is redirecting back to WP. Is there a way to make an exception to this particularly instance, or preferably, the entire directory? Any help would be much appreciated.

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

    # END WordPress

  2. rockethead
    Posted 9 years ago #

    I've really had to look to find a solution for this but I found it.

    at the top of the .htaccess for the parent directory to the one you want to exclude, in your case probably the wordpress root add the following line

    RewriteRule ^foo/ - [L]

    change foo to the name of the directory you want to exclude from WordPress's htaccess directives

Topic Closed

This topic has been closed to new replies.

About this Topic