Need help with parsing and redirect using Magento

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fastguys
Forum Newbie
Posts: 3
Joined: Thu Aug 26, 2010 2:57 pm

Need help with parsing and redirect using Magento

Post by fastguys »

Hi, all. I am not a developer and I know about enough to get me in trouble and I need some help. Any help is appreciated. Here's the issue.

The Problem: My old shopping cart (OpenCart) wrote product addresses as something like this: http://fastguys.com/index.php?route=pro ... duct_id=61 . That is the google listing for our A/C delete bracket and has great ranking, but it is still for the old cart. The new cart won’t return a 404 because any address http://fastguys.com/index.php +anything else delivers the home page. That means google never sees a 404 for that bad page and it stays in the search ranks and restricts our new site from ranking.

Question: Is there a way that I can parse and redirect all addresses that include http://fastguys.com/index.php****** where *****=any values. The new cart (Magento) uses http://fastguys.com/index.php as the home page.

Thanks for any help in advance.

Andrew Smith
shawngoldw
Forum Contributor
Posts: 212
Joined: Mon Apr 05, 2010 3:38 pm

Re: Need help with parsing and redirect using Magento

Post by shawngoldw »

You can redirect all requests to a domain or in your case yourdomain/index.php?**** through mod rewrite in a .htaccess file. There are lots of tutorials on how to do this, just search mod rewrite htaccess

Maybe someone else can give you a better idea of how to do it, but so far I've only done it very superficially and will be of no more help to you :D


Shawn
fastguys
Forum Newbie
Posts: 3
Joined: Thu Aug 26, 2010 2:57 pm

Re: Need help with parsing and redirect using Magento

Post by fastguys »

Thanks. I will look.
fastguys
Forum Newbie
Posts: 3
Joined: Thu Aug 26, 2010 2:57 pm

Re: Need help with parsing and redirect using Magento

Post by fastguys »

OK, I still don't understand the language. How do you tell php to redirect all index.php**** to 404? What does the "?" represent? How do you give it the variable of any value?

Thanks again for your help.
Post Reply