CGI Redirects
-
Trying to 301 old legacy files like oldsite.com/green/red.cgi/blue/ using this htaccess code:
Redirect 301 /green/red.cgi/blue/ http://www.newsite.com/summary-page/
Instead it's redirecting to: newsite.com/red.cgi/blue/FYI oldsite.com's htaccess file does not have any global 301 rules that would conflict
Does anyone know if cgi files require a different 301 syntax? Thanks!
-
Thank you Toby. I'll try this out.
-
Redirect 301 /green/red.cgi/blue/ http://www.newsite.com/summary-page/
is the old Redirect format, assuming your server is up to date (ish) you should be using something like:
RewriteRule ^/green/red.cgi/blue(.*)$ http://www.newsite.com/summary-page/ [L,R=301]
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
-
Can i do 301 redirect
So this is what im doing, 301 redirect to my site/allen-webdesign points to main domain Allen is the city i have a page called local-webdesign with all the cities. Will this improve my ranking or should i stop?
Technical SEO | | jsdfw0 -
301 Redirect Review Nodes
I have a client who rents out vacation beach rentals. They currently have thousands of homes under management. Each property has its own internal reviewing platform. Reviews are not really intended to be viewed on their own, as in a stand alone page with just the review on it. The problem is that Drupal makes just about every type of node viewable on its own dedicated URL. I was just thinking about taking request to view stand alone reviews and 301’ing them to their respective property page, the context in which they are intended to be viewed. The website has about 2500 review nodes currently crawlable via Drupal that sit on their own URLs. Would there be a material impact to 301 them to their respective property page when any attempt to view them on their own is made to the site?
Technical SEO | | conversionpipeline20 -
Remove a page after redirection
Hi, I had page eg. www.example.com/page1 and I redirect 302 it to > www.example.com/page2 After that I fatch this page (page2) with GSC and this page was index in serp. Can I remove this old redirect page > www.example.com/page1 now? Will this remove harm my page?
Technical SEO | | Tormar0 -
SSL redirect issue
Hi guys, I have a site that has some internal pages with SSL. Recently i noticed that if i put https://mydomain.com, this URL is accessible but all the design is messed up. My site is on wordpress and i use "redirection" plugin for all the 301 redirect. So i decided to add a new 301 redirect from https://mydomain.com to my actual URL version of home page http://mydomain.com. After doing that, my home page doesn't load at all. Does anybody know what happens? Thank you for advice!
Technical SEO | | odmsoft0 -
Rebranding / Redirecting
Hi I have a client who wants to re-brand their shopify clothing store under new domain name. Whilst still a clothing store its going to have different department structure and product pages and will hence be a different store/site. Is there anyway to pass any of the history/authority of existing site to the new one such as 301 redirecting the top level pages of existing site to nearest equivalent pages of new site etc or best to just redirect the old site domain to the new ? Cheers Dan
Technical SEO | | Dan-Lawrence0 -
301 redirects and seo..
I bought a domain and it has nice traffic. It only has about 5 main pages in php When i got the site i switched to html because php was overkill. I did the 301 and google deleted the php files and replaced with html version when i check site:domain.com It has been about 7 days. I DID NOT use 301 for each of the 5 pages to go php to html instead is used this code RewriteEngine On
Technical SEO | | samerk
RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule (.) http://www.mydomain.com/$1 [R=301,L]
RedirectMatch 301 (.).php$ http://www.mydomain.com$1.html So basically if you load php it will load the html version. dog.php > dog.html Is this OKAY? or should it be done differently.... worried! Thanks !0 -
Htaccess redirect with question mark
Hi I have a problem setting up my htaccess for a specific page that has a question mark in the link, and one that has a space in the link and also a question mark. So I would like 2 redirects in my htaccess like that: www.olddomain.com/page.php?page=pagename1 to www.newdomain.com/newpage1.html www.olddomain.com/page.php?page=page name2 to www.newdomain.com/newpage2.html I have tried with something like this but doesn't work: RewriteEngine on RewriteRule ^page.php?page=pagename1 "http://www.newdomain.com/newpage1.html" [R=301,L] RewriteRule ^page.php?page=page name2 "http://www.newdomain.com/newpage2.html" [R=301,L] Could someone tell me what exactly I have to change? Thanks
Technical SEO | | darkanweb0 -
Temporary redirects
why is wordpress creating redirects from trackbacks and what can i do about it? according to seomoz i have several of these kinds of temporary redirects: http://redlandsorthodontics.com/about-us-2/meet-the-staff/redlands-orthodontics/trackback/ redirects to http://redlandsorthodontics.com/about-us-2 what are trackbacks anyway since i didn't purposely create them?
Technical SEO | | dad7more0