Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Running CEON URI Mapping in a subfolder

    Quote Originally Posted by swguy View Post
    OK here's the fix:
    - in includes/configure.php, use DIR_WS_CATALOG for the folder name. Don't append the folder name to HTTP_SERVER.
    - in .htaccess, you want these changes vs what's recommended in admin:

    # At the top:
    Options +FollowSymLinks -MultiViews

    DirectoryIndex index.php
    RewriteEngine On
    RewriteBase /mysite/

    # At the bottom:
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+) index.php [QSA,L]

    PLUS you need MC's suggestion about prepending /yourstore to the uris in the table ceon_uri_mappings
    I agree with everything except the "necessity" of the revised htaccess to check for the presence file and folder requests.

    When HTTP_SERVER contains, as it should, just the server and DIR_WS_CATALOG contains the sub-directory as also is expected I have had success with the provided htaccess in a sub-directory provided that sub-directory didn't also have an htaccess file. If it did, I had to reiterate the rules in that sub-directory based on the server's configuration.

    The recommended file/folder check adds additional processing to the process of searching the filesystem as compared to evaluating the provided uri to eliminate those things that are of known concern. Yes, the above recommended revision is more flexible in that the htaccess need not be revisited for future modifications, but at a page-by-page cost and allowance of alternate content to be stored in the file system matching an existing request that would otherwise be handled by index.php.
    Last edited by swguy; 6 Jun 2019 at 04:21 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #12
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Running CEON URI Mapping in a subfolder

    Quote Originally Posted by torvista View Post
    ...
    And, the table `ceon_uri_mappings` uses the subdirectory as part of the path, so you would need to regenerate the urls if the additional shop is not in the same-named directory (on a dev server) as the production site.
    Wasn't there going to be a mod that did the regeneration? I can't recall what exactly happened with this.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #13
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Running CEON URI Mapping in a subfolder

    Quote Originally Posted by swguy View Post
    Wasn't there going to be a mod that did the regeneration? I can't recall what exactly happened with this.
    I thought I saw something recently that the commercial mod that supports generation/regeneration of uris was again available at ceon.net.

    I also have something that couples with EP4 to do a sort of intermediate rewrite.
    Last edited by mc12345678; 6 Jun 2019 at 03:22 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #14
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Running CEON URI Mapping in a subfolder

    There you go. I knew they were working on it for a long time but it kept getting delayed and I lost track.

    For those looking for details:
    https://ceon.net/seo-modules/ceon-uri-mapping-manager
    Last edited by swguy; 6 Jun 2019 at 05:01 PM.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #15
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Running CEON URI Mapping in a subfolder

    Oddly enough too, Ceon's own site has the "lingering zenid" problem that is one of the issues with this mod.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #16
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Running CEON URI Mapping in a subfolder

    I was hoping to avoid changing the ceon_uri_mappings by programatically injecting '/mysite' as a prefix for uri during the query in getURIMappingsResultset() but no joy. Has anyone done this? I was thinking

    Code:
        if (is_array($columns_to_retrieve)) {
           for ($i = 0; $i < sizeof($columns_to_retrieve); $i++) {
             if ($columns_to_retrieve[$i] == "uri") {
                $columns_to_retrieve[$i] = "concat('/mysite',uri) as uri";
             }
           }
        } else {
          if ($columns_to_retrieve == "uri") {
            $columns_to_retrieve = "concat('/mysite',uri) as uri";
          }
        }
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #17
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Running CEON URI Mapping in a subfolder

    Quote Originally Posted by swguy View Post
    Oddly enough too, Ceon's own site has the "lingering zenid" problem that is one of the issues with this mod.
    I don't know what their configuration is, but I found that php version played a significant factor and it had nothing to do with the mod's presence nor absence. It just wouldn't go away properly...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #18
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Running CEON URI Mapping in a subfolder

    Quote Originally Posted by swguy View Post
    I was hoping to avoid changing the ceon_uri_mappings by programatically injecting '/mysite' as a prefix for uri during the query in getURIMappingsResultset() but no joy. Has anyone done this? I was thinking

    Code:
        if (is_array($columns_to_retrieve)) {
           for ($i = 0; $i < sizeof($columns_to_retrieve); $i++) {
             if ($columns_to_retrieve[$i] == "uri") {
                $columns_to_retrieve[$i] = "concat('/mysite',uri) as uri";
             }
           }
        } else {
          if ($columns_to_retrieve == "uri") {
            $columns_to_retrieve = "concat('/mysite',uri) as uri";
          }
        }
    I haven't tried it, but I think that's only half of the solution... remember to get the data associated with a uri, the database has to be searched on the uri...

    If perhaps you tried to reach a destination using your edit and the native uri, perhaps it would come back as expected, but that's a separate search... and even then, would you want to prepend the attempted search with the sub-folder a second time if the existing uri already had that sub-folder?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #19
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Running CEON URI Mapping in a subfolder

    Quote Originally Posted by mc12345678 View Post
    I haven't tried it, but I think that's only half of the solution... remember to get the data associated with a uri, the database has to be searched on the uri...
    LOL yes you're right. Here's the rest:

    Code:
        // Remove from selections
        foreach ($selections as $key => &$sel_value) {
             if ($key == "uri") {
                $sel_value = str_replace("/yourstore", '', $sel_value);
             }
        }
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #20
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,621
    Plugin Contributions
    123

    Default Re: Running CEON URI Mapping in a subfolder

    OK all in one place for those who wish to copy & paste:

    below the global $db in getURIMappingsResultset() in includes/classes/class.CeonURIMappingDBLookup.php add:

    Code:
        if (DIR_WS_CATALOG != "/") { 
           // Add prefix to data
           $prefix = DIR_WS_CATALOG; 
           $prefix = rtrim($prefix, '/');
       		if (is_array($columns_to_retrieve)) {
              for ($i = 0; $i < sizeof($columns_to_retrieve); $i++) {
                if ($columns_to_retrieve[$i] == "uri") {
                   $columns_to_retrieve[$i] = "concat('" . $prefix . "',uri) as uri";
                }
              }
       	  } else {
             if ($columns_to_retrieve == "uri") {
               $columns_to_retrieve = "concat('" . $prefix . "',uri) as uri";
             }
           }
           // Remove from selections
           foreach ($selections as $key => &$sel_value) { 
                if ($key == "uri") {
                   $sel_value = str_replace($prefix, '', $sel_value); 
                }
           }
        }
    Last edited by swguy; 7 Jun 2019 at 08:12 PM.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v156 Ceon URI Mapping V5.0
    By Neil Kerr_Ceon in forum All Other Contributions/Addons
    Replies: 331
    Last Post: 26 Mar 2024, 02:03 AM
  2. Ceon URI Mapping v4.x
    By conor in forum All Other Contributions/Addons
    Replies: 2444
    Last Post: 7 Oct 2020, 03:13 AM
  3. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  4. CEON URI Mapping
    By jmkent in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 22 Nov 2012, 04:28 PM
  5. Ceon URI Mapping v4
    By conor in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 14 Aug 2011, 02:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR