probashi Posted November 16, 2010 Share Posted November 16, 2010 Hi all, Need some expert advice please.I have an online store running on a ASP shopping cart. I'm thinking of migrating to PHP/ to Prestashop.With the present site, some of the URLs have been indexed very well by google. For example:http://www.MySite.com/scripts/prodList.asp?idCategory=22 When i migrate, these URLs will be lost - Is there a way to overcome this.At present i'm hosting on window - I'm aware i will need to move to ApacheMany thanks Link to comment Share on other sites More sharing options...
shokinro Posted November 17, 2010 Share Posted November 17, 2010 If you use Linux hosting, you should be able to implement that by using URL Rewrite rule.But you need to learn how to write rules. Just Google keyword "php url rewrite tutorial" you will find a lot information on this. Link to comment Share on other sites More sharing options...
probashi Posted November 17, 2010 Author Share Posted November 17, 2010 Hi,Googled and read couple of articles - It's quite hard for me to fully understand .htaccess rewrite rules. But hope to learn.Can you please give an example of a rewrite rule based on the below URL:old url:http://www.MySite.com/scripts/prodList.asp?idCategory=22New url:http://www.MySite.com/5-new-newMany thanks Link to comment Share on other sites More sharing options...
shokinro Posted November 18, 2010 Share Posted November 18, 2010 Just for your reference. old url:http://www.MySite.com/scripts/prodList.asp?idCategory=22 I think following rule should work, I didn't test it. You can try.RewriteRule ^scripts/prodList.asp\?idCategory\=([0-9]+)$ /category.php?id_category=$1 [QSA,L,E] New url:http://www.MySite.com/5-new-new This one, PrestaShop will automatically generate a rule for you. I will be like as RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E] Link to comment Share on other sites More sharing options...
probashi Posted November 18, 2010 Author Share Posted November 18, 2010 Shokinro, thanks for your help - i appreciate it.I'm afraid this rule does not work. I'm landing on the 404 errors page. Also would this need to be a permanent redirect - 301Thanks Link to comment Share on other sites More sharing options...
probashi Posted November 19, 2010 Author Share Posted November 19, 2010 Bump Any body familiar with re-write rules who can help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now