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
-
1000 Pages on old website. What to do with the 301 redirects for this domain?
Hi Moz Community, I have a 301 redirect question... I just acquired an old domain: Totally in my niche Domain is 14 years old Website exists of 1000 pages Great amount of backlinks Website is offline since about 2 weeks Will place a new website online asap with new url structure For the 50 best scoring pages I wrote a new, but fully comparable/related article. I will put a 301 redirect from those old to the new pages. My question: What to do with the 950 other url's? Should I put a 301 redirect to the homepage? Should I forward those pages to the 404 page? Should I divide the 950 url's with a 301 redirect to the 50 new ones? Another solution maybe? Any idea what would be the best solution so we can save as much Google juice as possible? Thanks in advance!
Technical SEO | | snorkel0 -
301 Redirect keep html files on server?
Hello just one quick question which came up in the discussion here: http://moz.com/community/q/take-a-good-amount-of-existing-landing-pages-offline-because-of-low-traffic-cannibalism-and-thin-content When I do 301 redirects where I put together content from 2 pages, should I keep the page/html which redirects on the server? Or should I delete? Or does it make no difference at all?
Technical SEO | | _Heiko_0 -
Added 301 redirects, pages still earning duplicate content warning
We recently added a number of 301 redirects for duplicate content pages, but even with this addition they are still showing up as duplicate content. Am I missing something here? Or is this a duplicate content warning I should ignore?
Technical SEO | | cglife0 -
Can you do a 301 redirect without a hosting account?
Trying to retire domain1 and 301 it to domain2 - just don't want to get stuck having to pay the old hosting provider simply to serve a .htaccess file with the redirect rule.
Technical SEO | | TitanDigital0 -
Does it really matter to set 301 redirect for not found error pages?
I've very simple question for not found error pages. Does it really require to set up 301 redirect for all not found error pages which detected in Google webmaster tools? Honestly, I don't want to set 301 redirect exclude externally connected pages. So, what will impact on ranking after follow this process?
Technical SEO | | CommercePundit0 -
Help needed please with 301 redirects in htaccess file.
In summary, we're currently having issues with our htaccess file. 301 redirects are going through to the new described URL but in addition the new URL is followed by a ? and the old URL. How can we get rid of the ? and previous URL so they don't appear as an ending. None of the examples we've found re this issue online appear to work. Can anyone please offer some advice? Can we use a RewriteRule to stop this happening? Here's a summary of the htaccess file REDIRECT CODE BEGINS HERE LONG LIST OF REDIRECTS, which appear to be set up perfectly fine. REDIRECT CODE ENDS DirectoryIndex index.php <ifmodule mod_rewrite.c="">RewriteEngine On Options +FollowSymLinks
Technical SEO | | petersommertravels
DirectoryIndex index.php
RewriteEngine On
RewriteCond $1 !^(images|system|themes|pdf|favicon.ico|robots.txt|index.php) [NC]
RewriteRule ^.htaccess$ - [F]
RewriteRule ^favicon.ico - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]</ifmodule> DirectoryIndex index.php0 -
Trailing slash 301 redirect code
Hi, I have code for redirecting trailing slash to non-trailing slash, which works fine: RewriteCond %{HTTP_HOST} !^.yourdomain.co.uk$ [NC]RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L] (got code from http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html) But I cant find a code for redirecting to the trailing slash version anywhere, and I cant modify the above code myself. Can someone help resolve this issue please, or point me to a resource. Thanks very much James
Technical SEO | | jamesjackson0 -
Do 301 redirects pass page rank quickly
Hi I have been asked to carry out a site audit for a potential client. The site has that many issues I don't where to start in explaining them however, there is one question we are debating and would like to get a second opinion on it. The site I am auditing used to have a homepage rank 7. The site has currently had a redesign (new template with new URLs) and now the root domain 301 redirects to a sub folder two levels deep (not ideal I know!). This happened about a month ago and we are still getting N/A for toolbar page rank. The question is, does Google page rank transfer quicker than normal due to the redirects? or do we still have to wait on the next Google Page Rank update? Thanks in advance Gavelect
Technical SEO | | Equatorites0