Omit a directory in htaccess with permalink

By Jesus - February 1, 2019

Hello,

Sorry, is thera a way to omit a directory in htaccess with permalinks?

Thank you!

By daniel - February 4, 2019

Hi Jesus,

So that I can better address your question, could you explain a little bit more about your setup and what you'd like to achieve? Are you trying to prevent the Permalinks plugin from redirecting URLs in a specific directory?

Thanks,

Daniel
Technical Lead
interactivetools.com

By Jesus - February 4, 2019

Hi Daniel,

When I password protect a directory 'I'm receiving a forbidden error and it says something that permalinks. 

That's a directory that has nothing to do with cmsb so I was thinking that probably I just specify to not follow any permalinks instructions in that specific directory.

Thanks

By daniel - February 5, 2019

Hi Jesus,

That's a curious issue. By default, the permalinks plugin shouldn't be interfering with unrelated directories, so I'm not quite sure what the error could be. Could you copy/paste the exact error message here for me?

Thanks,

Daniel
Technical Lead
interactivetools.com

By Jesus - February 5, 2019

Sure, just a not found error.

I removed the password protected information already, I just enable it for the screenshot. As I need to have access to it to get the screenshot

Thank you!

By Jesus - February 11, 2019

Thank you, I just filled the form.

Jesus

By daniel - February 13, 2019

For anyone else who might encounter this issue: we narrowed the issue down to the way that this server's particular configuration was handling 401 (authorization) errors that are introduced by the password protection. We were able to resolve the issue by adding a line to the permalinks .htaccess code above the "RewriteEngine On" line so that it looked something like this:

  ErrorDocument 401 default
  RewriteEngine On
  RewriteBase /
  RewriteRule ^permalinks_dispatcher\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /cmsb/plugins/permalinks/permalinks_dispatcher.php [L]
Daniel
Technical Lead
interactivetools.com