Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
04-26-2012, 07:42 PM #1
- Join Date
- Apr 2012
- Thanked 0 Times in 0 Posts
how to redirect homepage with .htacces
I have a question about 301 redirects with a .htaccess file. I have read the sticky, but I just can not seem to find the right answer.
I am working with a .htaccess file to realize 301 redirects from several pages of my old site to the relevant pages in my new site.
my script looks like this:
redirect 301 /page1 http://www.newsite.com/page1
redirect 301 /page1 http://www.newsite.com/page2
redirect 301 /page1 http://www.newsite.com/page3
this is working correctly. But how do I make a redirect from my old homepage to my new one?
This doesn't work:
redirect 301 / http://www.newsite.com/
(it screws up the other redirects)
This doesn't work either:
redirect 301 /index.html http://www.newsite.com/
(maybe because my old site doesn't show index.html in de url, i dont know my old site is like www.oldsite.com and not www.oldsite.com/index.html)
Can somebody help me? Thanks in advance!