Htaccess conditional for localhost and server

Is it possible with a .htaccess file to detect if the server is http://localhost and if so to implement a conditional block?

.htaccess



# if ( server == http://localhost)
#    RewriteEngine on
#    RewriteBase /xamp/loca;
#    DirectoryIndex index.php index.html index.htm research_002.html
# else 
#   RewriteEngine on 
#   RewriteEngine on
#   RewriteBase /
#   DirectoryIndex index.php index.html
# endif