View Single Post
  #34  
Old 09-24-2015, 05:18 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: Clean URLs in 5.2.5

Quote:
Originally Posted by razortw
Thanks for sharing your mod!
But it doesn't seem to be working on X-Cart 5.2.6.
I installed and activated the module, but all product URLs still do have HTML extensions.
Also, extensions are in the database.
Are there any additional action required to make it work?
Thanks!


The mod won't remove the .html extension. You have to manually remove the .html from the xc_clean_urls. After you remove those extensions from the table. You should be able to redeploy the store, and they should be working. If the .html extensions are still in the table you will get a 404 error. The following sql command should do the trick:

UPDATE `xc_clean_urls` SET `cleanURL`=SUBSTRING(`cleanURL`,1,LENGTH(`cleanURL `) - 5) WHERE SUBSTRING(`cleanURL`,-5) = '.html'

I assume there is a way to run a sql command during installation of the mod, but I have to admit I'm unsure how to do it.

Let me know if this works for you, or if you still have problems.
__________________
Ver 5.2.6
Reply With Quote