i have old domain with subpages and subdomains. I want to redirect 301 all old domain pathes to new domain "/" (meaning index)
what is the best .htaccess rule to use?
At same time i would like to use some counter like google analytics to discover how much traffic goes from old domain, how to do it?
if you want to redirect permanently, here is the code:
Redirect 301 / http:/new-site.com/
Edit: Oh... it redirect with path. I am checking exact one.
RewriteRule ^(.*)$ http://yourdomain.ext/ [R=301,L]
This will work for you.
I dont know much about analytics part. Wish someone will help you in that regard.
Thanks, the OP has received the answer