301 redirect .htaccess problem
-
Can anyone explain to me why this doesn't work?
Redirect 301 /category/diamond-pendants/nstart/1/start/(.*) http://www.povada.com/category/pendants/nstart/1/start/$1
Im trying to replace everything after /start/ and insert it into the new url.
Thanks in advance.
-
If it doesn't work like you need let me know, you might need to do it in scripting.
-
Thanks for the help!
-
Redirect doesn't allow for (.*).
What your looking for either: RewriteRule to show the other page (which it doesn't sound like your looking for)
RewriteRule /category/diamond-pendants/nstart/1/start/(.*) /category/pendants/nstart/1/start/$1 [QSA,L]
Or the hardly used: RedirectMatch
RedirectMatch /category/diamond-pendants/nstart/1/start/(.*) http://www.provada.com/category/pendants/nstart/1/start/$1
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
-
Redirect chain error free htaccess code for website
i want to redirect domain, example.com to https://www.example.com, is anyone can help me to provide redirect chain error free ht-access code. I implemented this htaccess code on the website and mhy site show on the moz redirect chain error RewriteCond %{HTTP_HOST} !=""
Technical SEO | | truehab
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.)\sHTTP/[0-9.]+$ [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s(./)/+\sHTTP/[0-9.]+$
RewriteRule .* http://%{HTTP_HOST}/%1 [R=301,L]0 -
Old Content after 301 Redirect Success
Hi, I want to ask what need I do to the old content after my 301 redirect to the new domain with the same content success? Do I need to remove that old content? Nothing bad happen right? Thanks
Technical SEO | | matthewparkman0 -
301 Redirects Showing As 307 Redirects
Hi, Our clients are adamant that they have set up 301 permanent redirects on their websites, but when we check using Screaming Frog and various online HTTP status code checkers they are showing as 307 temporary redirects. Examples;
Technical SEO | | Webpresence
http://www.lifestylelifts.co.uk/home-lifts/
http://www.terrylifts.co.uk/ Again, the client says they are seeing 301 redirects. Why are we seeing 307's? Who is right? Very puzzling, any theories would be very much appreciated 🙂 Thanks in advance. Lee.0 -
301 Redirects
Hi, We have migrated to a new domain name and I wrote my redirects as follows: Redirect 301 / http://www.healthpointe.net Redirect 301 /urgent_care_locations.shtml http://www.healthpointe.net/healthpointe-locations/ Redirect 301 /locations.shtml http://www.healthpointe.net/healthpointe-locations/ Redirect 301 /career_client_relations_rep.shtml http://www.healthpointe.net/careers/ My issue is that when I include the first redirect, which is to the main page of the website that the other redirects stop working. Any idea what the problem could be?
Technical SEO | | healthpointeseo0 -
Canonicals & 301 Redirects to new Domain
We will be changing our domain name soon and I want to make sure I'm not painting myself into a corner. Of course, I want to transfer as much link equity as possible. Question #1: Do I need to define a canonical from the old domain to the new domain? Question #2: Do I also need to put 301s in place on the pages with link equity, or is there a way to apply 301s across the entire site on all pages? Any input would be appreciated greatly! Thanks!
Technical SEO | | BVREID0 -
301 redirect not working
Hi there! I have recently moved a domain that has been indexed by google and setup redirects so that it forwards to the new domain. It seems like the only redirect that actually is working is the canonical and main domain but every other page and or page nested within a folder are not working. Here is an example of some of the redirects. Am I doing this wrong? It seems to be going to the new domain but can't find the actual pages.... RewriteEngine On
Technical SEO | | twotd
RewriteBase /
RewriteCond %{HTTP_HOST} !agoodsweep.com$ [NC]
RewriteRule ^(.*)$ http://agoodsweep.com/$1 [L,R=301]
redirect 301 woodstoveservicerepair.html http://agoodsweep.com/woodstoveservicerepair/
redirect 301 /westchesterchimney.html http://agoodsweep.com/west-chester-chimney/ Thanks in advance for any help!!0 -
Redirect
Hello, I need to redirect just the homepage of my blog somewhere. So blog.com But there are other redirects in there and I don't want to override them. So blog.com/post.html How do I just redirect the homepage of wordpress page without redirecting all the other pages. This is what I did that recreated the issue. redirect 301 / blog2.com Thanks! Tyler
Technical SEO | | tylerfraser0 -
Difference between URL Rewrites and 301 Redirects for Rankings
What is the difference between URL rewriting and 301 redirects? Specifically if my home page is rewriting the www. version and the /index.html version rather than 301 redirecting them is this equivalent? Does it still pass the link juice on those alternate variations the same way a 301 redirect will?
Technical SEO | | rcarll0