Current location: Hot Scripts Forums » Other Discussions » Web Servers » 301 Redirect

301 Redirect

Reply
  #1 (permalink)  
Old 07-10-09, 03:11 AM
RichyRich38's Avatar
RichyRich38 RichyRich38 is offline
Newbie Coder
 
Join Date: Feb 2009
Posts: 78
Thanks: 2
Thanked 0 Times in 0 Posts
301 Redirect

Hi guy,

Dont really know too much about this subject so was after some help and advice

I have an old site which has a good PR, I have now redeigned the site and rebranded
what is the best way to rediect traffic to my new site

www.oldsite.com to www.newsite.com

I also would like to redirect people so if they go to a certian page on the old site they will be redirected to the new site page, The only problem is the old site has more pages than the new one. so many pages will be redirect to one page,

www.oldsite.com/sub.htm , www.oldsite.com/sub1.htm, www.oldsite.com/sub2.htm all redirect to www.newsite.com/sub

thanks for any help in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-10-09, 03:26 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 7,572
Thanks: 5
Thanked 27 Times in 24 Posts
Try this:
Code:
RewriteEngine On
RedirectMatch 301 sub\d*\.html?$ http://www.newsite.com/sub
RedirectMatch 301 ^(.*)$ http://www.newsite.com/$1

Last edited by Nico; 07-10-09 at 03:29 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-10-09, 03:36 AM
RichyRich38's Avatar
RichyRich38 RichyRich38 is offline
Newbie Coder
 
Join Date: Feb 2009
Posts: 78
Thanks: 2
Thanked 0 Times in 0 Posts
Thank you for the quick reply

this is what i had that was not working correctly
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newsite.co.uk/$1 [R=301,L]

ill try what u have said and see how that works, just going to try and get my head round, im real new to this..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 07-10-09, 04:12 AM
RichyRich38's Avatar
RichyRich38 RichyRich38 is offline
Newbie Coder
 
Join Date: Feb 2009
Posts: 78
Thanks: 2
Thanked 0 Times in 0 Posts
sorry to you know any good link that i can get some info on this,

just tried this and not really working. think i need a better understanding of the principles
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
.htaccess, 301, redirect


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] 301 redirect using .htaccess Frogger Web Servers 8 03-04-09 01:21 PM
[SOLVED] 301 redirect not working on dynamic url Deansatch Web Servers 1 01-02-09 07:47 AM
.htaccess 301 redirect MikeW Web Servers 3 08-30-08 04:40 AM
[SOLVED] .htaccess 301 redirect snaip Web Servers 12 03-09-08 10:15 AM
Really complex redirect 301 - need help! Josie ASP 2 07-08-06 04:22 PM


All times are GMT -5. The time now is 10:45 AM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.