.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
-
Wordpress Redirect Plugin Vs Manual .htaccess?
Hi everyone, I need to 301 redirect my old pages to new ones but i am confused between whether to choose plugin for this or i should manually rewrite the code on .htaccess file. Please give your suggestion and if you think i should use plugin then which one?
Technical SEO | | himanshu3019890 -
302 to 301 redirect confirmation
Hi guys, Fairly sure of the answer from what I've read so far, but I just wanted to doublecheck I have it right. Page A gets a significant amount of referring, followed traffic, and also ranks in Google. Page A uses a 302 redirect to Page B (on a completely different domain), which means that 0% of Page A's link juice is being passed on to Page B. If I were to change the 302 redirect to a 301 redirect, then the link juice passed on to Page A from the followed, referring traffic will be (mostly) passed on to Page B. Is that correct? Cheers, Jez
Technical SEO | | jez0000 -
301 Redirect question www to root.com
I have a site that has been up for a few weeks now and is currently in a www format and i am considering changing it to just mydomain.com I also have quite a few directory listings (including google places/bing) for this site w/ the www. url. If i do this, change it in my google analytics, and update my wordpress internal page + htaccess file. Will i lose any of the link juice i had from my www pages? Would this be something that would be advised since i've registered for many sites, or is there a potential that this could end up hurting me? Thanks,
Technical SEO | | tgr0ss0 -
301 Redirect
Hi there, We are re-branding & re-structuring our website, there will be quite a number of 301 re-directs, possibly hundreds. The question is: Should i wait until the re-branding has been completed and do al the 301's in one go?, or should I try and do 301's as i go along? Kind Regards
Technical SEO | | Paul780 -
Canonical tag, CNAME and 301 redirect
I have a website with a couple of domains pointing to one IP address. Let's say I have two domains www.example.com and www.example.ca I also see during my SEO analysis that the example.com and the www.example.com (same for the example.ca and the www.example.ca) are triggering server responses. How do I deal with this issue for best SEO. Canonical links? CNAME, or 301 redirects? thanks
Technical SEO | | casper4340 -
301 redirects twice
We currently have some 301 redirects set up on our site however sometimes a page will redirect twice before reaching the final location. Is this OK from an SEO perspective to have a page redirect twice or should we concentrate on reducing it to one?
Technical SEO | | JohnHillman0 -
Redirects on Window Servers - .htaccess equivalent for IIS
I am going to start searching myself, but I have a client on a Windows server needing to do redirects. So besides my usual 'Get a UNIX box', I need to know how to do redirects on IIS. Full site redirect: RewriteCond %{HTTP_HOST} ^[site].com [NC] RewriteRule (.*) http://www.[site]/$1 [L,R=301] as well as page level redirects redirect 301 /[old-page.php] http://www.[site].com/[new-page] And that leads me to the question of RewiteRules also? RewriteRule ^[requested-page].html [server-fed-page].php [L] Thanks if anyone can [redirect] me to a good URL for these. 🙂 Richard
Technical SEO | | Getz.pro0 -
301 Redirect NOT Working as Expected - HELP!
Hi! I just launched our newly coded site and just realized the installed 301 is NOT working. The URL string is the same EXCEPT for the removal of /shop/. Here is the code in .htaccess: ############################################ enable rewrites Options +FollowSymLinks RewriteEngine on #RedirectMatch 301 ^/shop?/$ http://hiphound.com/ RedirectMatch 301 ^/shop?/$ http://hiphound.com ########################################### When I go to Google and click on an old link I get a 404. No bueno!! Here is an example: http://hiphound.com/shop/rubit-dog-tag-clip I thought (and was told) that the installed 301 would send this page to: http://hiphound.com/rubit-dog-tag-clip It's not. Please HELP!! 🙂 What am I doing wrong??? Lynn
Technical SEO | | hiphound0