Reply
301 redirects
Old 08-30-2005, 08:23 PM 301 redirects
Average Talker

Posts: 19
Can somebody please explain to me how to do a 301 redirect? I have an old site, and I want to redirect any old traffic from that site to my current one.
biofarmag is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 08-31-2005, 06:00 AM
Ultra Talker

Posts: 286
Code:
RewriteEngine on 
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301]
add this code on your htaccess file
__________________
Alpha Web Directory | NaQQ
bentong is offline
Reply With Quote
View Public Profile
 
Old 08-31-2005, 05:22 PM
Average Talker

Posts: 19
I don't have an htaccess file
biofarmag is offline
Reply With Quote
View Public Profile
 
Old 08-31-2005, 06:24 PM
Average Talker

Posts: 19
Correction: I DIDN'T have one. I wrote one, and ftp'd it to the directory as .htaccess with the redirect 301 http://www.old.com http://www.new.com written in it.

It doesn't work.

Given that the directory didn't have an .htaccess file, could that mean that the server doesn't utilise .htaccess files? If not, is there a spider-friendly way of redirecting all traffic from that old site?
biofarmag is offline
Reply With Quote
View Public Profile
 
Old 09-04-2005, 10:14 PM
icon kid's Avatar
Junior Talker

Posts: 3
Quote:
Given that the directory didn't have an .htaccess file, could that mean that the server doesn't utilise .htaccess files?
Not necessarily -- the default configuration for the domains on most servers don't contain a .htaccess file -- they come naked and you have to create and configure such files just as you did. One thing to regard (which may have already been handled properly by your FTP program) is to make sure that the .htaccess file has been uploaded in ASCII format as opposed to binary format. Most FTP programs can automatically detect which format a given file should be uploaded in, but also will have a setting to force it to be uploaded in the format you choose. Other than that, the best thing to do is consult your Web host about this problem because this is something that should work properly on any Unix server.
icon kid is offline
Reply With Quote
View Public Profile
 
Old 09-05-2005, 01:55 AM
Average Talker

Posts: 19
I'm waiting for a reply from the host. Unfortunately, their offices are in New Orleans, which means I have to wait a bit.

In the meantime, I've put a page up there which says "please click here to be redirected", ie. put in a clickable link to the new page. THAT doesn't cause any google problems, does it?
biofarmag is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to 301 redirects
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14578 seconds with 12 queries