SEO: remove .html

[quote name=‘Scott_C’ timestamp=‘1376266322’ post=‘166662’]

Removing the “.html” was one of the first things we did around 3 years ago ,when switching to CS Cart. It hasn’t affected our SEO at all.

[/quote]



It did :P



Old SEO was still valid SEO back in the day. Circa 2008 made a huge difference!

We just setup an new cs-cart using our existing domain. I have question about seo name format.



[size=4][color=#555555]Under Category SEF URL format, is it possible to add item_name[-page-2].html option? we'd like to use the following url format for our category webpage.[/color][/size]



parent category name->sub-category-name



“[url=“http://www.ourdomainname.com/sub-category-name.html”]http://ourdomainname.com/sub-category-name.html[/url]

[quote name=‘Vali’ timestamp=‘1376255385’ post=‘166658’]

On file [color=#ff0000]app/addons/seo/func.php [/color]


  1. after (starting line:810) ```php


    $vars = fn_get_seo_vars($seo[‘type’]);

    $id_path = ‘’;

    if ($seo[‘type’] == ‘p’) {

    if (Registry::get(‘addons.seo.seo_product_type’) == ‘product_category’) {

addphp


$objects[‘extension’] = SEO_FILENAME_EXTENSION; //added by Valentin | hungryweb.net

<br />
2. replace (line:1437) ```php
<br />
$link_parts['extension'] = SEO_FILENAME_EXTENSION;<br />

``` with ```php
<br />
$link_parts['extension'] = ''; //modified, SEO_FILENAME_EXTENSION<br />

```<br />
<br />
or search for ```php
<br />
			// Convert products links<br />
			if ($parced_query['dispatch'] == 'products.view' && !empty($parced_query['product_id'])) {<br />
				if ($seo_settings['seo_product_type'] == 'product_category') {<br />
					$parent_item_names = fn_seo_get_parent_items_path('p', $parced_query['product_id'], false, $company_id_in_url, $lang_code);<br />
					$link_parts['parent_items_names'] = !empty($parent_item_names) ? join('/', $parent_item_names) . "/" : "";<br />
				}<br />
				$link_parts['name'] = fn_seo_get_name('p', $parced_query['product_id'], '', $company_id_in_url, $lang_code);<br />
				$link_parts['extension'] = SEO_FILENAME_EXTENSION;<br />

``` and replace ```php
<br />
$link_parts['extension'] = SEO_FILENAME_EXTENSION;<br />

``` with ```php
<br />
$link_parts['extension'] = ''; //modified, SEO_FILENAME_EXTENSION<br />

```<br />
<br />
<br />
---<br />
Valentin<br />
[color=#808080][size=2]part of hungryweb.net[/size][/color]<br />
[/quote]<br />
<br />
hey Valentin! work perfect in v4.0.2 to products. <img src="upload://ssa1U17ndImgNZSdwFNmOF2yUgM.png" class="bbc_emoticon" alt=";)"><br />
how can I remove the ".html" to the other pages?<br />
thank you!

After removing .html needs a 301 redirect from the old to the new pages to keep visibility in search engines. How to do it?

Please try
RewriteEngine on
RedirectMatch 301 (.*)\.html$ $1




I hope that helps,





Valentin

[color=#808080][size=2]part of hungryweb.net[/size][/color]

Hello!

I'd like to remove the .html from the links so that companies/brand and pages show as:



[url=“http://www.mydomain.com/product”]http://www.mydomain.com/brand[/url] instead of [url=“http://www.mydomain.com/product.html”]http://www.mydomain.com/brand.html[/url]



Has any of you done it?