WE'VE MOVED!
We are proud to announce our NEW community destination. Engage with resident experts and fellow entrepreneurs, and learn everything you need to start your business. Check out the new home of StartupNation Community at startupnation.mn.co
We are proud to announce our NEW community destination. Engage with resident experts and fellow entrepreneurs, and learn everything you need to start your business. Check out the new home of StartupNation Community at startupnation.mn.co
htaccess 301 redirect not working

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
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
Sign In or Register to comment.
Comments
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
Anther option is to change the DNS for the old domain to point to the DNS for the new web site.
~Roland
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
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
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
~Roland
Thanks for your help!
Kate
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.php5Redirect 301 http://www.mccormacks.net/sports.html http://www.mccormacks.net/index.php5Redirect 301 http://www.mccormacks.net/beer.html http://www.mccormacks.net/bar.php5Redirect 301 http://www.mccormacks.net/brunch.html http://www.mccormacks.net/brunch_menu.php5Redirect 301 /lunch.html http://www.mccormacks.net/lunch_menu.php5