.htaccess Redirect 301 issues
-
I have completely rewritten my web site, adding structure to the file directories. Subsequently added was Redirect information within the .htaccess file.
The following example ...
Redirect 301 /armaflex.html http://www.just-insulation.com/002-brands/armaflex.html
Returns this response in the URL bar of ...
http://www.just-insulation.com/002-brands/armaflex.html?file=armaflex
I am at a loss to understand why the suffix "?file=armaflex" is addedThe following code is inserted at the top of the file ...
RewriteEngine Onredirect html pages to the root domain
RewriteRule ^index.html$ / [NC,R,L]
Force www. prefix in URLs and redirect non-www to www
RewriteCond %{http_host} ^just-insulation.com [NC]
RewriteRule ^(.*)$ http://www.just-insulation.com/ [R=301,NC]Any advice would be most welcome.
-
Thanks for the suggestion.
The issue appears to derive from the fact that our web pages are published with .tpl (template) extensions, which are rewritten via PHP to include pricing information, then presented to the browser with an .html extension.
-
What happens when you remove all of your other rules and just have the 301 redirect?
-
Thank you for your kind advice. Unfortunately, the result remains the same ...
http://www.just-insulation.com/002-brands/armaflex.html?file=armaflex -
I think there's a problem with the Redirect and RewriteRule functions clashing. Try changing your redirects to RewriteRule. Let me know if this works.
RewriteRule ^armaflex.html$ http://www.just-insulation.com/002-brands/armaflex.html [R=301,NC]
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
-
Redirects, 301's & 404's
I have tons of links that I have had added a redirect to after creating my companies new website. Is it bad to have all these 301s? How do I permanently redirect those links? Also, on Google Search Console it's telling me I have 1,000+ excluded links. Is this bad? Will it negatively affect me? Is this something to do with my sitemap? Any help would be greatly appreciated 🙂
Technical SEO | | sammecooper0 -
301 Redirect Question
I am working with a website and I ran a Screaming Frog and noticed there are 4,600 301's on the website (www.srishoes.com). It seems like the issue is between the www. and without it and they aren't working together. Is this something that the website provider should update and what type of impact might this have on the site? Thanks!
Technical SEO | | ReunionMarketing
Matt0 -
301 Redirect domain with penalty
Wondering if I could get a few views on this please... I have added an affiliate store to a domain I own, however I forgot to noindex the product pages which were duplicate content of the merchants. Despite a good deal of backlink building the site will not do much in the engines at all, doesn't even come up on the first few pages for it's own name! This suggests to me that I have a duplicate content penalty. Try as I may I cannot get it removed so am thinking of cloning the domain to a new domain, however, I do not want to lose the links I collected so I am planning on 301ing them. While I will not get all the link power moved over, I should at least get credit for some of them which will kick start the new domain. Can anyone forsee any potential issues with doing this? Is there a danger of 301ing a site with a penalty that the penalty would be carried over? I know there is no penalty on the links, no WMT warnings etc, it is the content causing the issue. Thanks, Carl
Technical SEO | | Grumpy_Carl0 -
Does 301 redirect of old filenames still work?
I have gone through several revisions of my site. We used to have only static pages in HTML. I had search-engine-optimization.html changed to seo-philippines.html changed to /seo-philippines/ I 301 redirected all of them whenever I change the filenames. This is in the course of 6 years worth of link building and I'm wondering if this has an effect because our rankings go down everytime we do this.
Technical SEO | | optimind0 -
302 or 301 redirect to https ?
I am redirecting whole site to https. Is there a difference between 302 or 301 redirect for seo? Site never been indexed. Planning to do that with .htaccess command RewriteCond %{HTTPS} !=on
Technical SEO | | Kotkov
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L] There are plenty of ways http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html Which way would be the best? Thanks is advance0 -
New project old domain should I 301 redirect while new sites built
I just took on a larger scale e-commerce project and came across a tricky road block that I need some advise on. Ok I'm building the site from scratch and due to it's complexity it may take 3-4 months before I have it designed and coded. The client has a domain name that has some decent page/domain authority and I would hate to loose that while the sites being built. Currently I have nothing to display as his previous site got hacked and it was deleted by the previous web admin. Being that a blog has already been approved as part of the project I already installed wordpress to keep the domain fresh however here's the issue, I installed wordpress in a folder called blog and debating if I should 301 redirect or 302 redirect his index here? The blog will always reside in the blog folder even after launch. Will performing a 301 redirect pull all the juice away from my index page? I'm assuming yes. IF so what would occur once the project is complete and I make the ecommerce site live in the index page? Thanks in Advance! Mike
Technical SEO | | MikeDelaCruz770 -
301 Redirect & Cloaking
HEllo~~~~ People. I have a question regarding on cloaking. I will be really greatful if you can help me with question. I have a site www.example.com and it is targeting for multi countries. So I use sub directories for targeting multi countries. e.g. www.example.com/us/ www.example.com/de/ www.example.com/hk/ ....... so on and on. Therefore, when people type www.example.com, I use IP delivery to send users to each coutries. Here is my question. I use 301 redirect for IP delivery, which means when user enter www.example.com, my site read user's IP and send them to right country site by 301 redirect. In this case, is there any possibility that Google considers it as cloaking? Please people.... share me some ideas and thoughs.
Technical SEO | | Artience0 -
301 redirect from domain to home.aspx
We have been asked to look at a website and have found a 301 redirect from the domain www.domain.com to www.domain.com/home.aspx. Why would someone do this, this way round? We can't think of a good reason and are wondering if we have overlooked something? Thanks for your help.
Technical SEO | | travelinnovations0