Apache - Exclude a file from htaccess redirection, Avoid redirection of specific file

Exclude a file from htaccess redirection

Not operator (!) can be used to avoid redirection of a particular file.

 RewriteEngine on
 RewriteCond %{REQUEST_URI} !/filename.php
 RewriteCond %{REQUEST_URI} ^/(.*).php
 RewriteRule ^(.*).php /redirect_file.php?variable_1=$1 [R]

To avoid rredirection of index file
 RewriteEngine on
 RewriteCond %{REQUEST_URI} !/index.php
 RewriteCond %{REQUEST_URI} ^/(.*).php
 RewriteRule ^(.*).php /test.php?variable_1=$1 [R]

The topic on Apache - Exclude a file from htaccess redirection is posted by - Guru

Hope you have enjoyed, Apache - Exclude a file from htaccess redirectionThanks for your time

Tech Bluff