I have this .htaccess file in Wordpress. It's located at /public_html/ (web root). I need to exclude a folder (csNewsAd) from the rewrite engine. I've tried this, based from another question similar here at SO, but didn't work at all.
AddHandler x-httpd-php5 .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^/csNewsAd($|/) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Any suggestions?
More data
There's another .htaccess inside /csNewsAd for password protection:
AuthName "Clasificados"
AuthType "basic"
AuthUserFile /home/ig000192/public_html/csNewsAd/.passwd
Require valid-user
.htaccess affects all directories underneath, so if you put an .htaccess in csNewsAd with the rewrite directives you want, it will take precedence over the root file.
Here is my solution with regard to the GoDaddy WordPress site. My install had a web.config file so I added a rewrite rule. I wanted an /ApiData path where I could run an MVC.net application (virtual directory) for AJAX calls.
I'm pretty sure that you have already ruled this out, but since I came here for the same exact issue I wanted to share it with you: in my case the problem was actually on the permissions of - apparently, not being able to access the folder, the exclusion was being ignored.
Place the line below in the .htaccess file in the root.
Had the exact same problem and this worked for me. It is not the problem that the redirects don't work. The problem is that the 401 (Authorization Required) error is nog defined so the "popup" doesn't show.
Was having the same issue and found the answer to my problem here: http://kb.siteground.com/article/How_to_exclude_a_folder_from_Wordpress_permalinks.html
--From the site
To exclude the subfolders from the WordPress rewrite rules, you need to edit the .htaccess file and change the bold line below:
I know its an old post, but it still helped me. I had the additional problem of several blocks of RewriteRules:
and had to add my RewriteCond before every block...