Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Static URL's for all category and product pages
Author « Topic »  

graystoke
Starting Member

United Kingdom
2 Posts

Posted - 11/01/2024 :  04:18:02  
Hi everybody,
I've been running my current site on a heavily modified version of ECT v5.9.3 and a robust version of PHP 5.3 for over 12 years now but I am now in the process of transferring to the latest version of ECT 7.8.0 on PHP 8 but I have run into a problem when trying to serve all the category and product pages as static URL's.
This wasn't possible in 5.9.3 without the Complete Ecommerce Templates Shopping Cart SEO Add-On which used the script below in the .htaccess file to rewrite the URL's that were stored in extra columns added added to the product and sections tables in the database.

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule (.*)$ /handle_url.php [L]

ECT 7.8.0 already has the table columns for the static URL's (sectionurl for sections table and PStaticURL for products table) so I assumed that the latest version would be able to serve static category and product pages "out of the box" but when I insert a static URL into these columns (eg. /epsonxp2200.php) I get a 404 error until I remove the data which reverts the system back to serving its dynamic page URL's.

It's most important that the category and product pages are served with static URL's so that I can match them to the current website and keep the pages listed in Google without having to manually write literally thousands of 301 redirects in the .htacces file.

Could somebody please tell me if I am correct in assuming that I should be able to serve all my category and product pages as static URL's on ECT version 7.8.0 or am I missing something?

dbdave
ECT Moderator

USA
10406 Posts

Posted - 11/01/2024 :  07:06:10  
Hi,, if you insert url's into those columns, then those pages must exist, or you get the 404.
I think you want this instead - https://www.ecommercetemplates.com/seo/search-engine-friendly-urls-php.asp

David

graystoke
Starting Member

United Kingdom
2 Posts

Posted - 11/02/2024 :  18:33:29  
Thanks David,
I've managed to rewrite the old Complete Ecommerce Templates Shopping Cart SEO Add-On which now works with ECT 7.8.0 and is serving dynamic pages with the static URLs stored in the product and sections database tables.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000