Hi, I have 2 domain. www.damain1.pl and www.domain2.pl. I would like to prepere htaccess file, that will loda file index1.php when somebody typy www.domain1.pl or file index2.php when sombody type www.domain2.pl.
If I understand your requirements, the following should work. Note the order of the Options and the RewriteEngine directives. The value of %1 in the first RewriteRule is taken from the grouped class (-one¦-two) in the RewriteCond, and this rewrite will accept either www.domain-one.pl or www.domain-two.pl.
These rewrites illustrate the use of backreferences to variables in the RewriteCond, whereas most simple rewrites use backreferences to variables only in the RewriteRule itself. Apache mod_rewrite documentation [httpd.apache.org]
Note thet you will need to edit the "¦" characters in the above code, and replace them with the "¦" character on your keyboard, usually "SHIFT \".