Guest Posted October 9, 2008 Share Posted October 9, 2008 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: http://www.store.com/matrox-g200-p-1.html BECOMES http://www.store.com/matrox-g200-p-1/ Is this possible? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2008 Share Posted October 11, 2008 17 views and no replies? Quote Link to comment Share on other sites More sharing options...
Kanie Posted October 12, 2008 Share Posted October 12, 2008 (edited) 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 October 12, 2008 by Kanie Quote Link to comment Share on other sites More sharing options...
Guest Posted October 13, 2008 Share Posted October 13, 2008 Thanks Adam, I'll give it a go! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.