301 redirect w/ dynamic pages to static
-
I am trying to redirect old dynamically created pages to a new static one (single page). However, when I implement the redirects, it still uses part of the old dynamic url. For instance...
dynamic.php?var=example1
dynamic.php?var=example2
dynamic.php?var=example3
should all redirect to: static.html. However, they are redirecting to:
static.html?var=example1
static.html?var=example2
static.html?var=example3
The page is resolving fine, but I don't want google to misinterpret the new static page as numerous page with dup content.
I tried this in PHP on the dynamic.php page as follows, but it the problem above persisted:
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.mysite.com/static.html');I tried doing it in my .htaccess file as follows, but the problem persisted:
redirect 301 /info/tool_stimulus.php?var=example1 http://www.mysite.com/static.html
redirect 301 /dynamic.php?var=example2 http://www.mysite.com/static.htmlCan anyone solve this in PHP or w/ htaccess?
Help!!!
-
Thank you Devanur. I will make use of this if a 301 redirect solution can not be found.
-
Hi there,
If you are bothered about Google indexing multiple URLs that lead to the same page, you can try using the parameter handling tool in Google Webmaster Tools account. For more info:
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1235687
Hope this helps.
Best regards,
Devanur Rafi.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
Does removal of internal redirects(301) help in SEO
I am planning to completely remove 301 redirects manually by replacing such links with actual live pages/links. So there will be no redirects internally in the website. Will this boost our SEO efforts? Auto redirects will be there for incoming links to non-existing pages. Thanks, Satish
Intermediate & Advanced SEO | | vtmoz0 -
301 redirects Ruby on Rails
Can anyone point me to the best way to implement 301 redirects on a Ruby on Rails website?
Intermediate & Advanced SEO | | brianvest0 -
Best wordpress plugin for redirects, Old to new pages
What is the best wordpress plugin for redirects, Old to new pages?
Intermediate & Advanced SEO | | Michael.Leonard1 -
301 redirects cross domains
Hi Moz Community. We have a client that has Website A and Website B. Website A is going to be replaced by Website C, a new website and brand. Some products sold on Website A are going to be split out to Website B & C. i.e. Say Website A sells eight products - then four will go to Website B and four to Website C. OUR QUESTION Technically we know we can 301 redirect the Website A products to the relevant Website B & Website C products. 1. Given this convoluted structure, will there be any negative ramifications for SEO? and; 2. Which website would you redirect the homepage to, B or C?
Intermediate & Advanced SEO | | WCR0 -
URL Redirect: http://www.example.net/ vs. http://www.example.net
I currently have a website set up so that http://www.example.net/ redirects to http://www.example.net but **http://www.example.net/ **has more links and a higher page authority. Should I switch the redirect around? Here's the Open Site Explorer metrics for both: http://www.example.net/ Domain Authority: 38/100 Page Authority: 48/100 Linking Root Domains: 112 Total Links: 235 http://www.example.net Domain Authority: 38/100 Page Authority: 45/100 Linking Root Domains: 18 Total Links: 39
Intermediate & Advanced SEO | | kbrake0 -
301 Redirection and apostrophes in URLs
Hi I am experiencing trouble getting any redirects with apostrophes in the URLs to 301 redirect in order to eliminate 404 errors. I have tried replacing the instance of the apostrophe in the source URL field to %27 and variations of this but to no avail. The site is a wordpress site (the old URLS are legacies from the old Business Catalyst site) and I am using the redirection plug in. I have gone into some detail with a helpful soul here http://wordpress.org/support/topic/how-to-deal-with-apostrophes-in-source-url but unfortunately to no result. If anyone has any idea how to solve this puzzle I would be grateful for the help. Example: http://www.tesselaars.com/blog/Inside_Flowers/post/Online_Marketing_for_Florists_Part_1%E2%80%93_A_Website_You_Won%27t_Regret/
Intermediate & Advanced SEO | | Seamoose0 -
Are there any negative effects to using a 301 redirect from a page to another internal page?
For example, from http://www.dog.com/toys to http://www.dog.com/chew-toys. In my situation, the main purpose of the 301 redirect is to replace the page with a new internal page that has a better optimized URL. This will be executed across multiple pages (about 20). None of these pages hold any search rankings but do carry a decent amount of page authority.
Intermediate & Advanced SEO | | Visually0 -
301 Redirect With A Message And Delay
Hello, I'd like to sell a site I own. I'd like the site to be redirected to the buyers site with a 301 redirect. But I'd like the viewer to be informed that the site was purchased by this company and they will be redirect in 5 seconds.I'd like for the redirect to be a complete 301 and pass as much linklove as possible. Are you familiar with how to do this? Thanks, Tyler
Intermediate & Advanced SEO | | tylerfraser0