View Single Post
  #3 (permalink)  
Old 05-17-2012, 02:01 PM
the_michael_77 the_michael_77 is offline
Member
 
Join Date: 05-19-11
Location: Poland
Posts: 35
iTrader: 1 / 100%
I figured out where the problem was. At RewriteRule the RegExp applies only to the part of URL after host name which was very hard to find. The correct entry looks as follows:


RewriteEngine On
RewriteCond %{REQUEST_URI} !php$
RewriteRule (.+) http://www.mydomain2.com%{REQUEST_URI} [R]

The key point was (.+) which means 1 or more chars after the domain what guaranties that the RewriteRule will take an effect if there will be anything after www.domain1.com/
 
Reply With Quote