Community Forums › Forums › Archived Forums › General Discussion › 301 redirect for 404 page problem
Tagged: 301 redirect, 404 page, htacess file help
- This topic has 3 replies, 2 voices, and was last updated 12 years, 9 months ago by
Brad Dalton.
-
AuthorPosts
-
March 7, 2013 at 4:31 pm #24879
fotodog13
ParticipantLong 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 fileRewriteRule ^$ 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.March 7, 2013 at 6:01 pm #24894Brad Dalton
ParticipantDid 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.
March 8, 2013 at 6:19 am #24971fotodog13
ParticipantHey 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.March 8, 2013 at 4:04 pm #25056Brad Dalton
Participant -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.