Forum Moderators: phranque

Message Too Old, No Replies

url rewritting on htaccess for site using oscommerce

How to rewritten dynamic urls to static urls for the website using oscommer

         

skerobics

8:35 am on Apr 2, 2011 (gmt 0)

10+ Year Member



Hello Guys,The following are my site category,sub category and products dynamic pages.I want to convert them to static pages as given below.
earrings
www.mysite.co.uk/?cPath=15 ------->http://www.mysite.co.uk/earrings.html
gold earrings
www.mysite.co.uk/?cPath=15_11 ------->http://www.mysite.co.uk/gold-earrings.html
silver earrings
www.mysite.co.uk/?cPath=15_12 ------->http://www.mysite.co.uk/silver-earrings.html
emerald gold earrings
www.mysite.co.uk/product_info.php?cPath=15_11&products_id=90 ------->http://www.mysite.co.uk/emerald gold earrings.html
brown silver earrings
www.mysite.co.uk/product_info.php?cPath=15_12&products_id=100 ------->http://www.mysite.co.uk/brown-silver-earrings.html

I want to rewritten the urls and redirect them from dynamic to static urls.Can anybody help me. We are used oscommerce.

jdMorgan

9:12 pm on Apr 6, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't achieve your goal directly by using mod_rewrite... The fact that you state that you need a redirect is the problem. A redirect can be used to speed up search engines' re-indexing of your site once you fix it, but you cannot expect search engines to treat your site well if you continue to publish URLs which always result in a redirect... In fact, you can expect them to treat you quite poorly...

So, the first order of business is to correct all of your pages to publish correct URLs -- either by editing the .php code or by using a "plug-in" to do it for you.

After you've done that, then you can use 301 redirect rules to catch and redirect requests for your now-obsolete dynamic URLs and redirect them to your new static URLs. If your site is large, you will likely only want to use a limited number of these redirect rules to redirect only your most important pages. Otherwise, you will find that you site performance is slowed by having to process too many rewriterules for each page request.

There is a thread in our Apache Forum Library (see link at the top of this page) which describes the dynamic-to-static-URL conversion process from end to end. It may prove useful to you.

Jim

skerobics

12:26 pm on Apr 8, 2011 (gmt 0)

10+ Year Member



Hi jdMorgan,
Thanks for your reply
How can i correct all of my pages to publish correct urls by editing the .php code or by using a "plug-in" to do it for you.

I had lot of pages but i want to apply to some urls only.what is the best method to get maximum benifit to my website.I really appreciate your answer.

skerobics

5:47 am on Apr 12, 2011 (gmt 0)

10+ Year Member



Hey Administrator i am not an expert.Can u please guide me how to implement these changes.

g1smd

6:40 am on Apr 12, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So, the first order of business is to correct all of your pages to publish correct URLs -- either by editing the .php code or by using a "plug-in" to do it for you.
Hey Administrator I am not an expert. Can you please guide me how to implement these changes?
That's way outside the scope of forum level discussions. It's a major programming task. However, it is likely that someone else has already implemented what you need as a module or plug-in.
There is a thread in our Apache Forum Library (see link at the top of this page) which describes the dynamic-to-static-URL conversion process from end to end. It may prove useful to you.

skerobics

7:12 am on Apr 12, 2011 (gmt 0)

10+ Year Member



Thanks for your reply.Can you help me if you know the name of the plugin to do this job

jdMorgan

4:41 pm on Apr 14, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Search "oscommerce SEF plugin" and "search-friendly OSCommerce" or similar phrases on your favorite search engine.

Jim