Elevated Search Blog

Solution: OpenCart 301 Redirect Problem With Appending ?

06, Nov, 2012 - Written by in 301 Redirects, Development

While I was cleaning up URL structures on an Open Cart eCommerce platform I ran into an problem with the 301 redirections. Every time I would use the following code I would get a ? (question mark) appending the URL:

code: RedirectPermanent /old-url http://www.sample.com/new-url

results: http://www.sample.com/new-url?

I found out the correct solution for this was to use a RewriteRule:

code: RewriteRule ^old-url$ http://www.sample.com/new-url [L,R=301]

Notice on the “old URL” I did not include the domain or the starting directory /.

Using this code will hopefully help save you time as it did for me. Please be careful when modifying .htaccess files as it can take your site down faster than Mohammad Ali could in his prime!

becareful htaccess files

If you have any feedback or suggestions please comment below.

On side note I would not recommend using OpenCart as it lacks greatly when it comes to SEO, but I will leave that story to another post.



Share on Twitter

About Steve Peron

Steve Peron is one of the co-founders of Elevated Search, an elite team of SEO professionals based in San Diego. Steve has over 8 years of experience in Search Engine Optimization, specializing in on-page optimization, link building, outreach and CRO (conversion rate optimization).

6 Comments for this entry

Leave a Reply

Client Testimonials

Shawn B.
Director, Business Development and Online Marketing - Q-Industries
"Ricardo (Co-Founder of Elevated Search) and his staff did a great job of managing our account from start to finish. Their level of effort was ABOVE what was contractually obligated and the results spoke for themselves. Even across different time zones he was responsive, flexible and open to change as we crafted a search engine optimization strategy."
Danny D.
CEO at PremiereVanities.com
"Steve (Co-Founder of Elevated Search) is on the forefront of search engine optimization. It is clear that his knowledge goes beyond the basic understanding of how to market in search engines but he clearly understands and can conceptualize on a level that I have not found in too many search experts. He is easy to work with and is a strong role model to others in our company that are just learning. We are lucky to have Steve as a resource for our company."

Let’s elevate Your Business

Give us 5 minutes of your time and let’s see if we are a good fit. If we are not, we can help you find someone who is. It’s a no-lose proposition.

Elevated Search, Inc.
2544 Gateway Road
Carlsbad, CA 92009
© 2013 Elevated Search All Rights Reserved.
Get Results
What We're Good At Who We Are
On Page Optimization
Link Building
Local SEO
Lets Talk
In The News

Need help with something? Let's chat!

Please fill out the information below and we will email you to schedule a time to talk.