Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Site continues to direct to old subfolder

    Hello. I recently got new hosting, and when I moved all my files and got set up I decided to move everything into the root folder so that it's not in a subfolder as it used to be. I have a lot of old links such as on facebook when I was advertising my site that have the address with the subfolder in it, so I've been trying to figure out how to redirect from the subfolder to the root, that's one issue. But, aside from that, even just going to my site and then clicking on any category or product goes immediately to the old subfolder page and nothing is there because the files are no longer there. I changed my configure file so that it no longer says my files are in a subfolder, so this shouldn't be happening. This is what I have in my configure.php, the part that matters for this concern:

    PHP Code:
    define('DIR_WS_CATALOG''/');
    define('DIR_WS_HTTPS_CATALOG''/'); 
    My subfolder used to be /store, and I removed all instances of this in this file.

    This is my .htacess file that I have in my public.html folder:

    #<IfModule mod_rewrite.c>
    #RewriteEngine On
    #RewriteBase /
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^www\.blackorchidcouture\.com
    #RewriteRule (.*) http://www.blackorchidcouture.com/$1 [R=301,L]
    #</IfModule>

    RewriteEngine On
    RewriteRule ^subfolder/(.*)$ / [R=301,L]

    My site is www.blackorchidcouture, and it goes there fine, then clicking on anything tries to go to the old /store folder and can't find anything. Should I just put all the files in the /store folder for now? I really just want the subfolders to be forgotten on google, just start fresh with my root domain. Any ideas? Thanks ahead of time!

  2. #2
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Site continues to direct to old subfolder

    I also just realized that if I go to one of those links and remove the /store from the address, it still doesn't show anything, which it should....

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

    Default Re: Site continues to direct to old subfolder

    Looks like you may have a uri rewriter involved and if so, the current htaccess does not appear to handle/address it.

    As a result of not carrying over the associated rules, the provided link(s) are not resolving correctly/able to be interpreted.

    To maintain linkage from the old path(s) to the new location, the existing previous uris need to remain "available" but mapped to the new path that doesn't include that sub-directory.

    I'm making an assumption, but it may seem like Ceon URI Mapping is being used. Generating new active links and making the current active links historical would resolve that issue. By that I mean, don't just go into the database and modify the path of the existing links. That would break the tie from the old to the new locations.

    I make that assumption based on what I believe any other URI rewriter to do which would be to create a link based on the current condition not using a historical linkage.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Site continues to direct to old subfolder

    You are totally right, I am using that! I just turned off Ceon URI Mapping and it now goes to products and categories! Now I just need to redirect any old links with the /store subfolder to the root, I'll try working at the .htaccess again and will report back :) Thanks SOOO much!!

  5. #5
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Site continues to direct to old subfolder

    So, I think that redirecting to the root still won't work in terms of old links because the URL for those links were rewritten with the CEON, and now without rewriting the same way, even if it redirected and removed the /store it'd be looking for the CEON rewrite in terms of the URL. So I think the only thing to do is to remove all those old facebook posts that directed people to either products or categories. Any other ideas?

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Site continues to direct to old subfolder

    Yeah, restore your htaccess as recommended in the Ceon URI setup. Then as desired/done, reset the uri(s) for the items to your current path...

    That change can be done manually (at each product, category, etc...), by populating the database with the new link and changing the status of the old or commercially (a few ways come to mind for that).

    But, basically you can have your files/store located in the root and have this "sub-directory" but not actually have a sub-directory (or it may exist, but there isn't anything that actually uses the sub-directory at this point).

    Yes, attempting to redirect via the htaccess isn't going to help in this case...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Site continues to direct to old subfolder

    Thanks for helping me with this! So I think it's easier to just remove all my old links in facebook. So that part can be solved. But, my site isn't completely working yet. At least now it's not coming up with 404 error pages when I click on a product or category, but it's still not working correctly. The products don't show the info or an add to cart button, and the categories don't show products. If you click on the very first product on my home page it shows correctly, so it is able to work at least in that one instance, but others aren't showing correctly. Any idea how to figure out what's going on so I can fix it? Thanks for any ideas!

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

    Default Re: Site continues to direct to old subfolder

    Quote Originally Posted by BlackOrchidCouture View Post
    Thanks for helping me with this! So I think it's easier to just remove all my old links in facebook. So that part can be solved. But, my site isn't completely working yet. At least now it's not coming up with 404 error pages when I click on a product or category, but it's still not working correctly. The products don't show the info or an add to cart button, and the categories don't show products. If you click on the very first product on my home page it shows correctly, so it is able to work at least in that one instance, but others aren't showing correctly. Any idea how to figure out what's going on so I can fix it? Thanks for any ideas!
    I disagree and believe you are doing your site a great disservice... what you think of as facebook links, the Internet thinks of how to find you and your products...

    If you simply recreated the htacces and ensured that the sub-directory shop was not in the exclusions, then you would be good to go. If you have links to items that do not include the sub-directory, then go to those product/items and recreate the link as it was provided elsewhere and all is still good...

    As far as navigating the site, I just went to a product, navigated to another and another still and had no problems.

    If anything when I looked at the source code of the page when going to the link in your signature, I oddly found that there were both https: and http: links to your site. A LOT of them... Something like 167 https: and some 364ish http:... don't know what is causing that as really those seen should have been mostly one or the other... don't know if you're using cloudflare or some other intermediate caching system...

    When I checked the canonical link it showed https:, but the page was being served http:...

    Would suggest clearing your cache for your browser, but not sure how others will "work through" the issue(s)...

    Again, would suggest re-enabling the rewriter with the appropriate htaccess and then take whatever process to move items to not include the shop sub-directory as stated before.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Apr 2010
    Location
    Albuquerque, NM
    Posts
    198
    Plugin Contributions
    0

    Default Re: Site continues to direct to old subfolder

    I agree, ideally I'd have all those old posts up. So you are saying to copy all of my store files into the /store folder? So that when someone clicks on one of those old links with the subcategory it will go to something? Do I have to make another database or would it use the same one? And when someone checks out, would it work? I just don't want to confuse the system, or make google think I have two identical stores.

    That's strange about the http/https stuff, thanks for noticing that.

  10. #10
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Site continues to direct to old subfolder

    Quote Originally Posted by BlackOrchidCouture View Post
    I agree, ideally I'd have all those old posts up. So you are saying to copy all of my store files into the /store folder? So that when someone clicks on one of those old links with the subcategory it will go to something? Do I have to make another database or would it use the same one? And when someone checks out, would it work? I just don't want to confuse the system, or make google think I have two identical stores.

    That's strange about the http/https stuff, thanks for noticing that.
    No... you do not need to move your files...

    Recreate the htaccess as directed by the Ceon URI Mapping module.

    If the following is included in that list of RewriteCond, then remove it.
    Code:
    RewriteCond %{REQUEST_URI} !^/shop/ [nc]
    See, the canonical link will be site/
    The link to these other things will include the /shop/ at the beginning of the link and will be handled.

    Let me put it another way. With your store at the base of your domain. You have the ability to name your product uri whatever you want. The problem is that you don't want it to start with a folder that you actually want to be able to access... that's why the htaccess rules have the list of "exceptions".

    If you do still havea folder named store, then recommend for added measure to rename it (store2) for example.
    Last edited by mc12345678; 4 Jun 2019 at 08:56 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Removing subfolder without disrupting site...
    By swdynamic in forum General Questions
    Replies: 2
    Last Post: 14 Jun 2010, 11:04 PM
  2. installing second site in subfolder
    By stitchnkitty in forum Installing on a Linux/Unix Server
    Replies: 11
    Last Post: 19 Mar 2010, 06:04 PM
  3. Moving my site from subfolder to domain but not working :-(
    By credenscel in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 25 Dec 2008, 12:56 AM
  4. Having trouble moving site from subfolder up to root of domain
    By Tom_Ace in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Oct 2008, 05:03 AM

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