Jump to content

Removing .html from page names


vidmarc

Recommended Posts

CubeCart uses only index.php and everything else is brought in using PHP's include function.

So, it is (probably) possible to suppress the appearance of index.php in the URL because the web browser is commonly configured to execute it being the first in the list of default documents.

First, if the .html part is going to disappear, then .htaccess needs to stop parsing for it.

From:

RewriteRule ^(.*)\.html?$ index.php?seo_path=$1 [L,QSA]

To:

RewriteRule ^(.*)$ index.php?seo_path=$1 [L,QSA]

But probably better to make it optional to catch obsolete occurances:

RewriteRule ^(.*)(\.html?)?$ index.php?seo_path=$1 [L,QSA]
(Check for the correctness of this format.)

Next, in /classes/seo.class.php:

Near line 45, from:

private $_extension   = '.html';

To:

private $_extension   = '';

Also in the same file:

Find the function SEOable(). Near the beginning of the function, find
three instances of str_replace() dealing with search.html.

Replace search.html with just search.

I haven't tried any of this.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...