Suggestions in redirecting an old URL to new URL with parenthesis () ?
-
What should I use in .htaccess if I will redirect an old URL with parentheses to a new URL like below?
RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe(7)/red http://www.newdomain.com/buy/nike-shoes/kobe(7)/red
Or
RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe(7)/red http://www.newdomain.com/buy/nike-shoes/kobe(7)/red
-
So did that process of escaping the special characters solve your issue, esiow?
-
I'll try this one. Big help ThompsonPaul! I'll let you know if this works. Thanks a lot!
-
The successful way to accomplish this can depend a bit on your server configuration, esiow, but the most likely workable and reliable solution is to "escape" the non-standard URL characters. (Actually, the best solution would be to get rid of the unsafe URL characters altogether, but that's not what you asked )
.htaccess rewritedirect rules are essentially regular expressions or regexp. In regexp, many non-URL characters are used to format different commands. So having them as an actual URL character causes the redirect rule to try to process them as regexp instead of as just a URL character. Whew - hope that makes sense.
To tell the redirect rule to treat the non-standard character as an actual character instead of a command - you "escape" it by adding a "****" (without the quotes) in front of each character that could be a problem.
So:
RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe(7)/red http://www.newdomain.com/buy/nike-shoes/kobe(7)/red
becomes:
RedirectMatch 301 http://www.olddomain.com/buy/nike-shoes/kobe***(7***)/red http://www.newdomain.com/buy/nike-shoes/kobe***(7***)/red
Give that a try in your .htaccess file and let us know if it works. if not, there may be a couple other options to try.
Hope that helps?
Paul
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
-
Never ending new links and our rank continues to plumet
HI everyone, I've been having an issue with a severe drop in rankings (#2 to #36ish). All of my technicals seem to be ok, however I seem to be getting my images hotlinked (which I have killed in nginx) from these spam like pages that pull and link to an image on my site, then link again with a " . " for the anchor. Even more strange is that these pages are titled and marked up with the same titles and target key words as my site. For example, I just got a link yesterday from a site leadoptimiser - d o tt- me which is IMO a junk site. The title of the page is the same as one of my pages, the page is pulling in images relevant to my page, however the image sources are repos EXCEPT for 2 images from my site which are hotlinked to my pages image and then an additional <a>.</a> link is placed to my website. I have gotten over 1500 of these links in the past few months from all different domains but the website (layout etc) is always the same. I have been slowly disavowing some of them, but do not want to screw up anything in case these links are already being discounted by G as spam and not affecting my rank. The community seems to be really split on the necessity of disavowing links like these. Because of these links, according to Ahrefs, my backlink profile is 38% anchor text of "." . Everything else checks out in my own review as well as Moz tools and Ahrefs with very high quality scores etc. Webmasters is fine, indexing is fine, pagespeed insights is in the 90's, ssl is A+. I've never had to deal with what seems to be an attack of this size. Thanks.
White Hat / Black Hat SEO | | plahpoy1 -
Multiple redirects for GA tracking
We recently replaced a high traffic online service with a new one that now resides at a new URL. We redirect the old site (https://subdomain.mysite.org) to a static page announcing the change (http://www.mysite.org/announcement.html) that links out to the new online service. The SSL cert on the old site is valid for two more months and then would cost $1K to renew. We'd like to measure traffic from the old link over the next two months to see if it's worth renewing the SSL cert to keep a redirect going. If I go into GA, filter the "announcement.html" page and set the secondary dimension to "referral path" I'm not seeing any traffic from https://subdomain.mysite.org. Guessing this is part of the "(not set)" group. First thought was to have that go to a unique intermediary page to log the referral, which then redirects out to the announcement page. Is this considered spammy or is there another way to track referrals from the https site that I'm not considering? Thanks.
White Hat / Black Hat SEO | | c2g0 -
Want to Remove numbers from Old Post URL - Will it effect its Ranking?
Hi. I have a number of posts that are ranking in google for several keywords. However the URLs contain numbers, for example 2011, 2014 and 35. I want to remove these numbers to make the URLs more updated. If I use the 301 redirect for old URL to the new one, will I retain the same ranking for these blogposts Or it can effect the ranking. Does anyone have tried this in the past? I would like to get your opinion on this. Thanks in advance.
White Hat / Black Hat SEO | | techmaish0 -
Partial Manual penalty to a URL
Hi Mozers, I have a website which has got a partial manual penalty on a specific url. That url is of no use to the website now and is going to be taken off in 3 months time as the website is going to be completely redesigned. Till then I dont wont to live with the partial manual penalty for this url. I have few things in mind to tackle this: 1. take out the url from the website now (as the new redesign will take 3 months) 2. take out internal links pointing to this url in question 3. file for reconsideration with google stating we have taken off the url and have not generated any backlinks and the backlinks are organic. (no backlinking activity has been done on this website or the url) Please let me know if this works or i will have to get the backlinks removed then the disavow then the reconsideration. Looking forward for ur response 🙂
White Hat / Black Hat SEO | | HiteshBharucha0 -
Magento Category URL
Hello I do SEO consulting and a client launch a new Magento Enterprise site. My question is they changed a URL from /category-list/ to /category/ and it is 301 redirecting correctly but the links off of that URL are not. Example: www.site.com/category/ if you click a link the next one shows up like this: www.site.com/categorty-list/vendor/ for example. Any help would be appreciated! Thanks
White Hat / Black Hat SEO | | christaylorconsulting0 -
Whether letting an old category just 404 out is OK
Hello, We've got some hidden categories that are still indexed in the search engines. If there are no links to these hidden categories, can we just let them 404 out and be OK SEO wise? We can't 301 redirect them. It's about 50 categories.
White Hat / Black Hat SEO | | BobGW0 -
What is the difference between using .htaccess file and httpd.conf in implementing thousands of 301 redirections?
What is the best solution in terms of website loading time or server load? Thanks in advance!
White Hat / Black Hat SEO | | esiow20130 -
What do you think of our new category page?
Hey Mozzers! We have come up with a new layout design for a category page and would love to have your opinion on it, specifically from an S_E_O perspective Here is our current page: http://www.builddirect.com/Laminate-Flooring.aspx Our new page (pending approval): http://www.builddirect.com/testing/laminate-flooring/index.html Just to brief you in on the key differences b/w old and new layout: Left text link menu is removed in new layout
White Hat / Black Hat SEO | | Syed1
New layout looks funny with JS disabled - long vertical line up of products(Perhaps important keywords/ content in new layout appears way down?)
Lot of 'clunk' has been removed (bits of text, links, images, etc) Thanks for checking this out.0