Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-26-2012, 07:42 PM   PM User | #1
Pike80
New to the CF scene

 
Join Date: Apr 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Pike80 is an unknown quantity at this point
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!
Pike80 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:53 AM.


Advertisement
Log in to turn off these ads.