Trying to use this and keep getting a 404 error, any idea on how I can sort this using the latest zen cart and I have put the rewrite rule in.
Printable View
Trying to use this and keep getting a 404 error, any idea on how I can sort this using the latest zen cart and I have put the rewrite rule in.
Hi,
My Zen Cart was originally installed in a sub-folder, "store," of the main site. We are restructuring, removing the main site and moving Zen Cart to the root. All the URIs have "store" in the URI mapping field. Is there an easy way to remove this from all the URI mappings?
Many Thanks!
Easy?? meaning AUTOMATED?? MOPE.. you gotta buy the commercial Mapping Manager module from JS Web to get the automation you are seeking.. Otherwise, you can try running a script against the DB to remove JUST the "store" string from the URI mapping table. or you will have to roll up your sleeves and edit each product, category, manufacturer, and EZ page.
Thanks @DivalVocals. Not quite the answer I was hoping for but half anticipating.
Just in case anyone else has the same issue here is the SQL I used to remove "/store" from the front of the URI Mappings.
Code:UPDATE ceon_uri_mappings
SET uri = RIGHT(uri, length(uri) - 6)
WHERE uri like "/store%";
Although it wasn't deeply described, but if this store is/was already indexed/bookmarked then you'll be missing out on the benefit of the uris being rewritten using CEON URI Mapping. By that I mean anyone/anything visiting your-store.com/store/cool-category will not get redirected to your-store.com/cool-category but instead either product not found or to the root...
A .htaccess rule could be used at this point to rectify that if it is needed, but ideally inactive URIs in CEON URI Mapping would be used to accomplish that.
Forgot about that.. :laugh: The .htaccess rule will be easier.. The OP would have to regenerate every URI manually if he doesn't own the Mappings Manager.. Just did this for a client. Moved her site from a sub-folder to the root.. This should be placed above other rules in the .htaccess file. Works like a dream..
Code:#To redirect the contents of a whole directory to the webserving root
RewriteRule ^store/(.*)$ /$1 [R=301,NC,L]