Find us elsewhere
Join Now Member Login

htaccess 301 redirect not working

 
New Topic
Post Reply
Follow Topic
Page of 2 Next »
  • Author
  • Message
 
KateG

posts: 42

May 02, 2008 10:35 AM ET    Quote  Report Abuse
Points: 0   Vote
I am trying now to redirect code from www.shapeacakeclay.com to www.shapeacake.com.  On another post Roland had suggested using htaccess 301 redirect. 
 
I created a file called ".htaccess" in notepad and tried each of the following sets of code:
 
RewriteEngine ON
RewriteRule ^(.*)$ http://www.shapeacake.com/$1 [R=301,L]
 
or
 
Redirect 301 /index.html http://www.shapeacake.com/index.html
 
Then I uploaded it into my main directory.  The way my ftp access is set up is that my main directory is for the shapeacakeclay account and then there`s a folder for the shapeacake clay account, which avoided me having to pay twice as much for the hosting.  I believe I only need the htaccess code in the main directory (and not the shapeacake sub-directory), though I tried including in both and it didn`t make a difference.
 
Anyway, it`s not working.  When I type in the shapeacakeclay site, it doesn`t redirect to the shapeacake site.  Any suggestions?  Thanks!
Kate
vwebworld

posts: 1237

May 02, 2008 1:26 PM ET    Quote  Report Abuse
Points: 0   Vote
Are the home pages on both domains the same?
Do you have Linux hosting rather than Windows?
 
The .htaccess file is FTP`d to the server in ASCII rather than Binary format.
 

Redirect Old domain to New domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled

 


-------------------------

Web Design | Best Beef Jerky | ecommerce articles | Follow vwebworld on Twitter
vwebworld

posts: 1237

May 02, 2008 1:58 PM ET    Quote  Report Abuse
Points: 0   Vote
Is your new site hosted in a sub directory of your old site/domain?
 
Anther option is to change the DNS for the old domain to point to the DNS for the new web site.
 
~Roland


-------------------------

Web Design | Best Beef Jerky | ecommerce articles | Follow vwebworld on Twitter
KateG

posts: 42

May 02, 2008 4:13 PM ET    Quote  Report Abuse
Points: 0   Vote

Yes, both home pages are an "index.html."
I`m 90% it`s Linux hosting - I use godaddy.

I`m at work right now, but when I get home I`ll try the code that you provided and check that it`s transferring in Ascii.

Yes, my new site is hosted in a subdirectory of my old site. I`ll try the code that you provided.  If that, for some reason, doesn`t work, I`ll see if I can figure out how to change the DNS for the old domain.

Thanks for your help!  I`ll report back.

Kate

vwebworld

posts: 1237

May 02, 2008 4:18 PM ET    Quote  Report Abuse
Points: 0   Vote
Hi,
I checked and your hosting is compatable with htaccess.
 
Being on the same hosting with sub directory may be a problem.
You could ask your web host how they suggest doing a 301 redirect.
Remember your host has to be mod-rewrite enabled.
 
~Roland
 
 
 


-------------------------

Web Design | Best Beef Jerky | ecommerce articles | Follow vwebworld on Twitter
KateG

posts: 42

May 04, 2008 12:41 AM ET    Quote  Report Abuse
Points: 0   Vote
Hi Roland,
 
Turned out to be a little complicated due to the sub-directory situation.  Tech support on godaddy told me that in order to do the 301 redirect I`d need to make the shapeacake account primary.  In one instance, I could get a new hosting account, which would take ~12 hours or in the other I could just have the primary reassigned, which would take ~24 hours.  Both of these sounded a bit long, especially since I recently gave my website to a lot of people. 
 
I asked what the consequences in terms of the SEO would be if I just had duplicate sites.  He said that the shapeacake account probably wouldn`t come up on searches, but the shapeacakeclay would and that the search results for shapeacakeclay shouldn`t be affected by any of this.  My thoughts are that as long as both are up and as long as the search engines are finding one of them, it shouldn`t be a problem as is.
 
Please let me know if you disagree or have other thoughts.  Thanks!
 
Kate
vwebworld

posts: 1237

May 04, 2008 1:18 AM ET    Quote  Report Abuse
Points: 0   Vote
If both sites are identical, including page titles and keyword placements in content, it might be a problem. Google`s guidelines on duplicate content.
 
~Roland
 
 


-------------------------

Web Design | Best Beef Jerky | ecommerce articles | Follow vwebworld on Twitter
KateG

posts: 42

May 04, 2008 2:12 PM ET    Quote  Report Abuse
Points: 0   Vote
Thanks Roland.  You`re right.  I called godaddy`s tech support again.  They had me delete the sub-directory and then redirect the shapeacake site to the shapeacakeclay site.  Preferably it would have been the reverse, but they said the site would be down for about 3 days then.
 
Thanks for your help!
 
Kate
Videography

posts: 672

May 13, 2008 6:56 PM ET    Quote  Report Abuse
Points: 0   Vote
Their "down" time estimates are always on the long side. 


-------------------------

Steve Mann
Internet Videographer
MannMade Digital Video
My Email


Feb 01, 2010 9:49 PM ET    Quote  Report Abuse
Points: 0   Vote

I have a new site and want links that used to point to

lunch.html

point to

lunch_menu.php5

My .htaccess is present and working, other code is working fine, just none of these redirects are working.

Redirect 301 http://www.mccormacks.net/dinner.html http://www.mccormacks.net/dinner_menu.php5
Redirect 301 http://www.mccormacks.net/sports.html http://www.mccormacks.net/index.php5
Redirect 301 http://www.mccormacks.net/beer.html http://www.mccormacks.net/bar.php5
Redirect 301 http://www.mccormacks.net/brunch.html http://www.mccormacks.net/brunch_menu.php5
Redirect 301 /lunch.html http://www.mccormacks.net/lunch_menu.php5



-------------------------

Page of 2 Next »
Post Reply
 
.
Advertisement

Keep the Community Clean!

  • StartupNation forums should be used as a platform to learn, educate others, share stories, tips & tricks and to provide constructive feedback.
  • Please do not use the Forums for advertising & blatant self-promotion.
  • Please be respectful to other members and refrain from personal attacks and vulgar language.
  • StartupNation reserves the right to delete any message, reply, and/or member who violates our terms of use.
Read full terms of use
Advertisement
Advertisement
Advertisement
Advertisement