Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable all parent htaccess

I have wordpress installed in the root of my website public_html

Although I have other folder inside a projects folder running their own websites.

The .htaccess in the wordpress folder (parent-most folder) might be causing issues for the inside folders.

Is there a way, I can mention for a folder not to look any higher for htaccess files ?

DETAIL:

The two main issues I am currently having our - if I set the status code to 500, I am get redirected to my home page (index.php) - if a page is not found, it gets redirected to index.php

Thanks.

like image 418
Prakash Raman Avatar asked Dec 20 '25 16:12

Prakash Raman


1 Answers

Put this code in your .htaccess under DOCUMENT_ROOT directory (just above your wordpress rewrite stuff):

RewriteRule ^subfolder(/.*|)$ - [L]
like image 101
anubhava Avatar answered Dec 23 '25 06:12

anubhava



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!