Hi.. Well.. i m working over my site but facing few problems with this.. Please try to sort it out.. thanks... I have previosu domain so called domain1.com and i got new domain now so called domain2.com i want when users come to www.domain1.com/something/123.htm then they must get auto redirected to www.domain2.com/something/123.htm CAN ANY ONE HELP OUT ??
RewriteEngine On RewriteCond %{HTTP} ^www.domain1.com/something/123.htm$ RewriteRule ^/?$ http://www.domain2.com/something/123.htm [R=301,L] Something like this.
its ok dude... but you gave for specific location.. i.e. something/123.htm i want for dynamic.. like might be foldername or filename can change like somewhere/234.htm so i cant make for each and every file.. so suggest something different.
Its how I understand your problem. You should explain a little bit of details so I can figure out what are you trying to accomplish here. So, what I understand now is you want to make a CRR and make every member who came to domain1.com/anything will redirect to domain2.com/anything...is it? Assuming the structure of both site are still the same, RewriteEngine On RewriteCond %{HTTP} RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} Does this helps?
In my opinion you need the following RewriteRule %{HTTP_HOST} ^domain1.com$ [NC] RewriteCond (.*) http://domain2.com/$1 [R=301,QSA,L]