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
-
Suggestions
Hi everyone, I'm trying to optimize this page https://goo.gl/PYKAJL for the keyword "sedie design" in Google It (italy). I was gaining positions the month of july. After july I've lost 15 positions and I don't know why. Can someone help me and give me any suggestions? Thank you
White Hat / Black Hat SEO | | vanGoGh-creative0 -
Deleting 301 Redirect URLs from the CMS
Hi Everyone, Would there be a negative SEO effect from deleting pages with 301 redirects in your CMS? Does anyone know of an average time of authority transfer from a redirect? Thanks,
White Hat / Black Hat SEO | | JMSCC
Jon0 -
Do searchs bot understand SEF and non SEF url as the same ones ?
I've jsut realized that since almost for ever I use to code first my website using the non sef for internal linkings. It's very convenient as I'm sure that what ever will be the final url the link will always be good. ex: website.com/component1/id=1 Before releasing the website I use extensions to make the url user friendly according the choosen strategy. ex: website.com/component1/id=1 -> website.com/article1.html But I just wondered if google consider both urls as the same ones or if it consider just as a 301 redirection. What do you think is the best to do ?
White Hat / Black Hat SEO | | AymanH0 -
Unique page URLs and SEO titles
www.heartwavemedia.com / Wordpress / All in One SEO pack I understand Google values unique titles and content but I'm unclear as to the difference between changing the page url slug and the seo title. For example: I have an about page with the url "www.heartwavemedia.com/about" and the SEO title San Francisco Video Production | Heartwave Media | About I've noticed some of my competitors using url structures more like "www.competitor.com/san-francisco-video-production-about" Would it be wise to follow their lead? Will my landing page rank higher if each subsequent page uses similar keyword packed, long tail url? Or is that considered black hat? If advisable, would a url structure that includes "san-francisco-video-production-_____" be seen as being to similar even if it varies by one word at the end? Furthermore, will I be penalized for using similar SEO descriptions ie. "San Francisco Video Production | Heartwave Media | Portfolio" and San Francisco Video Production | Heartwave Media | Contact" or is the difference of one word "portfolio" and "contact" sufficient to read as unique? Finally...am I making any sense? Any and all thoughts appreciated...
White Hat / Black Hat SEO | | keeot0 -
How does the Google Treat 301 Redirects?
Hi, My website was one of many that dropped in rankings this last Friday, The company that i outsourced my SEO 4 months ago did a bad job. Now i'm doing everything my self to recover, so i was thinking getting a new hosting, duplicate the website with a same content (i have original quality content) and 301 my old domain to new one? How long can it last with Google? Can penalties be passed via 301 redirects ? Looking forward to your help.
White Hat / Black Hat SEO | | mezozcorp0 -
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 -
Buying a website and redirecting everything
We are considering purchasing an existing website in our industry with a domain authority of 52 and 20K inlinks and redirecting it to our new website with a domain authority of 26 and 1,000 inlinks. Would this be the best way to improve our new site's authority and inlinks? Would Google penalize us for doing that or would it effectively transfer the old sites authority to us?
White Hat / Black Hat SEO | | pbhatt0