Jump to content
Sign in to follow this  
Sam G

Ultimate SEO URLs 2.1D and .html extensions

Recommended Posts

On USU 2.1D is there any way I can change the .html extension to something else (ideally, I'd like the files to not have an extension, so it looks like each page in the 'store' is a directory name if you see what I mean.


For example:








Is this possible?

Share this post

Link to post
Share on other sites

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);

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);

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

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this