Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ultimate SEO URLs 2.1D and .html extensions


Guest

Recommended Posts

It sure can. In includes/classes/seo.class.php find this line:

 

												case ( $page == FILENAME_PRODUCT_INFO && !$this->is_attribute_string($p2[1]) ):
													$url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], '.html', $separator);
													break;

And change it to:

 

												case ( $page == FILENAME_PRODUCT_INFO ):
													$url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], '/', $separator);
													break;

Then in your .htaccess file find:

 

RewriteRule ^(.*)-p-(.*).html?$ product_info.php?products_id=$2&%{QUERY_STRING}

And change it to:

 

RewriteRule ^(.*)-p-(.*)/?$ product_info.php?products_id=$2&%{QUERY_STRING}

 

You can repeat this process for all of the calls to $this->make_url(), changing the '.html' to what you wish and updating the .htaccess accordingly. Make a backup and test as you edit just in case but I'm sure it will be ok. I have modified my seo.class.php file extensively and not come across any issues.

Edited by Kanie
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...