cancel
Showing results for 
Search instead for 
Did you mean: 

301 redirect - where does it go?

philwalton
Dabbler
Posts: 15
Registered: ‎10-03-2010

301 redirect - where does it go?

Hello,
Hope someone can help.
My Plusnet site is www.waltons.plus.com ; I have copied this site to a personal website www.waltonsfamilyhistory.co.uk hosted elsewhere (less restriction on web space)
All the searches go to the original waltons.plus.com - I would like them to go to waltonsfamilyhistory.co.uk
I would like to put a 301 Redirect in the .htaccess file of www.waltons.plus.com but I don't know where it is - or where I should put it!
How do add or amend .htaccess?
I have used Komposer for all my webpage production.
Can someone advise me please?Huh
Thank you for reading....Phil Walton
6 REPLIES 6
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: 301 redirect - where does it go?

The .htaccess file would be in /htdocs on Homepages, but you probably don't have one at the moment. To check you need to access your Homepages /htdocs folder using Komposer (if it allows you to view remote file system contents) or an FTP program such as FileZilla Client. Because the .htaccess filename starts with a dot it is a hidden file and Komposer or the FTP program needs to be told to show it (Force showing hidden files at the bottom of the Server menu on FileZilla).
To redirect all requests from Homepages to your new site you need a .htaccess file containing
[code=.htaccess]
RewriteEngine On
RewriteRule (.*) http://www.waltonsfamilyhistory.co.uk/$1 ; [R=301,L][/code]
I'm not familar with Komposer and don't know if it will allow you to create and upload a .htaccess file. Alternatively, if you are using a Windows PC it is usually easier to create this file as htaccess.txt using a plain text editor such as Notepad. Then upload to /htdocs as an ASCII transfer (FileZilla will do ASCII by default); finally rename it to .htaccess using your FTP program.
It should take effect immediately. Smiley
David
philwalton
Dabbler
Posts: 15
Registered: ‎10-03-2010

Re: 301 redirect - where does it go?

Thank you for the reply - I thought I understood it but things seem to be just the same.
I used File Zilla as this is the program I normally use for uploading.
I was going to copy a jpeg of the File Zilla screen here but I can't work it out so I have attached the file.
It shows that there is a file in htdocs called .htaccess  the contents of the file are:
RewriteEngine On
RewriteRule (.*) http://www.waltonsfamilyhistory.co.uk/$1 [R=301,L]

Can you advise me further please?
Thanks...Phil
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: 301 redirect - where does it go?

Sorry, it's ages since I used .htaccess on Homepages, forgotten one has to do things differently on there.
The following works from my site:
[code=.htaccess]
Redirect permanent / http://www.waltonsfamilyhistory.co.uk/[/code]
Just that one line instead of what you currently have.
David
Edit: simplified the redirect code.
David
philwalton
Dabbler
Posts: 15
Registered: ‎10-03-2010

Re: 301 redirect - where does it go?

Thanks David, that works!!
At least it brings up the new site although the search results show the old site.
It that as it should be?
I suppose if  I deleted the old site completely the new site would appear in the search?
Anyway, thanks again....Phil
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: 301 redirect - where does it go?

Glad to hear it works. Smiley
With regard to searches, I don't think anything will change until the search engine robots try to index your old site again. They will then be redirected to the new site and be told the move is permanent. That should cause them to update their links to reference the new location. How long this takes depends on how often your site gets indexed.
In the mean time anyone browsing to the old location will be redirected and served from the new one.
Though your old site files are physically still there that redirect will prevent anyone from accessing them so logically they don't exist. For example try renaming the index.html in your plus.com /htdocs folder. You should find requesting index.html (or nothing) in your browser still works, the redirect should send you to the new site and it will be served from there.
David
David
philwalton
Dabbler
Posts: 15
Registered: ‎10-03-2010

Re: 301 redirect - where does it go?

Ahh, that does make sense.
I had checked on the google webmaster thing - cache:yoursite.com/page.html a few days ago when I started on this.
All the ones I checked were in July so it should be in a couple of weeks.
Thanks again for helping out especially the clear explanations.
Phil