301 redirect for 404 page problem

Community Forums Forums General Discussion 301 redirect for 404 page problem

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  braddalton 1 year, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24879

    fotodog13
    Participant
    Post count: 50

    Long story short.
    I have site that was built on the temp url
    69.195.124.84/~aielloen/hes/

    I moved the site out of the root.
    The old address is coming up in google.
    tried using 301 simple redirects and the redirection plugin to solve the problem with no luck/
    Wondering a couple of things
    1. will a change be instant
    2. should I add the following code to the sites htaccess file

    RewriteRule ^$ http://my-domain/ [R=301,L]
    and if so where in htaccess file do I place this?

    here’s a copy of the current htaccss file info

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    3. is my thinking correct- is this going to solve my problem.As always thanks to anyone that can give me some advice- I appreciate the help.

    Best

    Scott V

    * don’t think you should need ot but never know here is the  site url aielloenergy.com
    using the latest copies of wordpress, genesis, and theme, etc.

    #24894

    braddalton
    Participant
    Post count: 9802

    Did you do a search, find and replace on all url’s and file paths before changing locations?

    What i do is install the WP Migrate DB plugin and enter in the new details then export the database for import into a newly created DB. (this changes all the file paths and url’s so you don’t suffer from broken links)

    Then move the files to the new location. No broken links and works perfectly every time.

    Redirection is an excellent plugin for managing redirection’s in WordPress and fixing broken links however it does use server resources.

    Your host will help you with .htaccess file code otherwise find one that does.


    #24971

    fotodog13
    Participant
    Post count: 50

    Hey Brad,

    Thanks for the reply. I usually work in the same fashion you are mentioning above, in this instance things got screwed up when the client uploaded something and got poking around. They saw that I had the ” do not let the search engines index the site” checked off and the site got indexed on the temporary build that was not in the root.
    The site has no broken links the only problem I have found is that the temp build page is coming up in the search returns.
    I thought I might be able to solve this by using redirection plugin, or creating a 301 redirect with a plugin but that didn’t do it, so looks like I need to talk to the host about the .htaccess code file.

    #25056

    braddalton
    Participant
    Post count: 9802

    It should drop off at some stage if it keeps returning 404.


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.