.htaccess redirect (need help quickly please)
Today i noticed that all my links are not redirected the right way so i am loosing my link juice.
Can someone help me out.
What i did was this in my .htaccess file
redirect 301 /tag/my-old-website-link http://www.mynewsite.com/tag/my-old-website-link
Now what happens is that the new link becomes http://www.mynewsite.comtag/my-old-website-link
So after the .com the / is missing.
Any help would be appreciated!
Edit: i found a part of the solutio开发者_开发技巧n. I also had this redirect / http://www.mynewsite.com
After deleting this part everything worked fine.
Now my question is how to redirect the homepage the right way also
I found out :-)
To only redirect the homepage i have added this to my .htaccess file:
RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com$ RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
Now every extra line is redirected correctly
精彩评论