301 redirect issues
-
Hi all,
I'm hoping someone will be able to help me with an extermley frustrating problem with 301 redirects in .htaccess.
Basically I'm trying to redirect some old pages (from our old website) that stil rank to the new equivilent.
For example -
old url =
www.domain.com/frames/news/company-news/news-reader.php?newsStoryID=395
New
www.domain.com/news/article-title
I've tried the simple
redirect 301 /frames/news/company-news/news-reader.php?newsStoryID=395 http://www.domain.com/news/article-title
But this doesnt work. I've also tried -
RewriteEngine on
RewriteCond %{QUERY_STRING} ^newsStoryID=395$
RewriteRule ^/news-reader.php$ http://www.domain.com/news/article-title/? [L,R=301]Could anyone help? I've followed lots of tutorials that all match the above but it just doesn't work! The only other thing within the htaccess file is from wordpress for pretty permalinks -
BEGIN WordPress
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule>END WordPress
Many thanks in advance!
-
Thanks for the link, the plugin works a treat! Life saver.
-
My mistake, it's the Redirection plugin (http://wordpress.org/extend/plugins/redirection/), not Redirect. I use it on my site, and use it to redirect incoming links from another domain that's blanket 301ing to my site, and it was never on wordpress. There's an easy way to look at the 404s to your site and set up a redirect from the 404 page (handy if someone did a typo on a URL to you, accidentally added a period to the hyperlink, etc.)
-
Thanks for the reply. I've taken a look at the plugin (don't really like usings them and normally just write my own) but it doesn't look to be able to handle historical pages - from before the site was build in wordpress.
-
Not a direct answer to your question, but I personally use and like the Redirect plugin for Wordpress. Have you tried something like that? I'm not an htaccess expert, so can't help you out otherwise.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Having issues with Redirects not working and old links on SERP
We just migrated a site and built a redirect map for Site A to B. If there were old redirects made for site A that weren't pulled when pulling internal links for site A, do those also need to be redirected to site B to eliminate a Redirect chain? Cannot figure out why old links are still showing up, does it take a few days for google to figure out these are not real pages?
Technical SEO | | Ideas-Collide0 -
Recently migrated to https version of volusion site. 301 redirect link chain question
I recently migrated to a https version of a volusion site. They have some type of internal 301 redirect method to accommodate for the entire site. I have also used the 301 redirect manager to redirect categories and pages which I have changed. The question is if I have changed a page internally in the redirect manager from say source. /bluewidget to say. target. /superbluewidget is it wiser or even possible to do it this way to reduce the redirect chain from 3 to 2 steps source. /bluewidget to. target https://www.example/superbluewidget can a relative link be targeted to a full url to reduce steps in a 301 redirect link chain. Thanks
Technical SEO | | mrkingsley0 -
301 redirects for all urls - legal dispute
The website in question is a very high traffic website with substantial credibility in it's subject matter (sorry, can't share more details) that delivers an overwhelming majority of traffic from SEO, much of which is new visitors. A legal dispute has resulted in both parties agreeing to forward a percentage of the total URLs to alternative websites (only 1 website for each party). All URLs for the domain will be forwarded elsewhere. It does not make sense to me that the "sum of the parts" will be as strong once the redirects are implemented but I am looking for feedback. It is fair to say that the alternative domains of each party are no where near as strong as the domain being "parted out." Will the SEO juice be distributed to each domain in full? Will both parties lose out substantially? Feel free to ask for clarifications and I'll do the best I can given the legal parameters. Thanks.
Technical SEO | | ReachMaineAgency0 -
301 Redirect
Hello Moz Community, I have a question regarding 301 redirecting a new domain that contains keywords relevant to my website. However, I do NOT want to change my current domain. My main question is, by just redirecting this new domain to my current website, will those keywords in the new domain help with ranking in anyway? Thanks in advance for any help!
Technical SEO | | WyzeOwl0 -
Why can't I redirect 302 errors to 301's?
I've been advised by IT that due to the structure of our website (they don't use sub-folders) it's not possible to change 302's to 301's. Is this correct, or am I being fobbed off?
Technical SEO | | lindsaytuerena0 -
How do I fix a 301 Redirect Loop?
Saturday I waas doing some correcting of some duplicate titles, including nofollowing tags, etc. (my main problem was duplicate titles due to tags and categories being indexed). Now this morning I see that one of my pages refuses to load, citing a 301 redirect loop. http://www.incredibleinfant.com/feeding/switching-baby-formula/ Originally, the page was posted under the wrong category. http://www.incredibleinfant.com/uncategorized/switching-baby-formula I resaved it under the correct category (feeding) and now it won't load. Can someone help me figure out how to correct this mess? Thanks so much Heather
Technical SEO | | Gotmoxie0 -
301 redirect or 302
A client of mine has an international company named www.taxglobalizers.com if you come from Holland they 302 redirect you to the www.taxglobalizers.com/en version of the site and if you come from Holland they redirect with a 302 to www.taxglobalizers.com/nl version. I think it is best to change this in a 301 redirect. Am i correct in this? Kind Regards, Ruud
Technical SEO | | RuudHeijnen0 -
301 redirects & merging two sites into one
We have a client that has two sites that rank well for different searches in their market. The main pages ranking are things like advice articles and news pieces. For various reasons, they just want one site. I believe they need to duplicate the content from the outgoing site and place it on the main site, with a 301 redirect from each old page to each new one. What happens when they eventually want to redirect the entire domain? Would these smaller, internal redirects become obsolete, therefore removing any link value they once had? I am not sure how this works or if there is a best practice way to do this. Thanks Gareth
Technical SEO | | Gmorgan0