I've produced a front controller for this site. I wish to pass all demands towards the website through this front controller. Now I additionally possess some other software set up in the net root and right now i'm adding individuals folders to disregard via .htaccess to ensure that their demands also don't visit front controller. I'm doing something similar to below,

  RewriteEngine On

  RewriteCond $1 !^(folder1folder2folder3robots.txt)

  RewriteRule ^(.*)$ index.php [QSA,L]

This works for the time being, but it is possible to method to add demands just for specific domain or folder to obtain passed through index.php for Eg: www.mysite.com or www.mysite.com/folder4 or mysite.com.

By doing this I do not have to keep adding folders to disregard whenever a replacement is produced.


EDIT: I'll try to allow it to be simpler. I would like all of the demands for just one specific folder and primary site to undergo a front controller. Apart from these, all demands ought to be processed as always

You could utilize these conditions rather to exclude any request that may be planned onto existing files or sites:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

You should use the SERVER_Title variable:

RewriteCond %{SERVER_NAME} ! ^(www\.)?mysite\.com$