Results 1 to 10 of 42

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: path routing problem with the hosting

    zen cart solution makes me a redirect 302 to a 404, but since I have many products obselet the best solution in my case would be a collective 301 final.
    The following in a htaccess will redirect any non file/missing page to your index.php page
    Code:
    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ / [L,QSA]
    </IfModule>

  2. #2
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: path routing problem with the hosting

    Hello Kobra, it's okay I put nell'htaccess, but I would like to understand why it does not work the 301 and I get a double-header in response to live instead in localhost does rederict. Then how come if I have a product that does not exist I get a 302 to a 404 error as I think it is not normal ricere an error 302 to a 404.
    Giovanni,
    Zen Cart V2.1

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,918
    Plugin Contributions
    13

    Default Re: path routing problem with the hosting

    Quote Originally Posted by diamond1 View Post
    Hello Kobra, it's okay I put nell'htaccess, but I would like to understand why it does not work the 301 and I get a double-header in response to live instead in localhost does rederict. Then how come if I have a product that does not exist I get a 302 to a 404 error as I think it is not normal ricere an error 302 to a 404.
    i can think of a few reasons why it works in your localhost and not in live. first would be the difference in the configuration of the server. second would be the data in your database is different on your localhost v the live server. third, the code on the 2 machines, which you think is the same, may be different.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #4
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: path routing problem with the hosting

    I can not get out of this situation, I tried but nothing seems to zencart does everything to give a 302 and then 404 as an error if the product does not even exist in the online demo is always a rederict 302 to 404. This is not normal and is probably the cause of my problems that I can not get rid of products exist where I can not make a rederict 301. But where there is a url rewriting of the 404 works well does not make the first 302 is directly as a 404 error.
    I hope someone will give me the solution. Thanks Gio

    Here's an example of a demo of zencart where product ID does not exist from a 302 and then a 404 something completely useless to give a 302 before.

    https://www.zen-cart-pro.net/templat...ducts_id=34522

    Click image for larger version. 

Name:	Schermata 2016-05-18 alle 08.36.22.jpg 
Views:	372 
Size:	70.8 KB 
ID:	16321
    Giovanni,
    Zen Cart V2.1

  5. #5
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: path routing problem with the hosting

    Recently I helped someone to do a sort of redirect. The first attempt also was to modify the main_template_vars file because it made sense as that was where the data was "determined" to be correct, but a similar issue occurred (headers already sent). This has to do with the sequence of information loaded and that such a redirect (at least a specific one like you are trying to do) ought to be handled in the header related file(s). While the responsive template may have some factor in the issue, my suggestion would be to do your test/check in the header_php.php file before the notifier at the end and redirect from there.

    Now I am not aware of what all else is going on regarding the 302/404 issue, which seems to be a unique problem to the software/server side. There has been discussion about possible differences between your live site and your local one, but no identification of specifically those differences. I suggest that you find a comparison tool and identify any differences between the two sites including but not limited to the contents of each file as well as files that exist on one server and not the other. In some cases, and often, names of files are changed to make them "old" but the change does not prevent the file from loading because of the file's extension and the location in which it remains. Feel free to post the filenames and discrepancies to obtain further assistance.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: path routing problem with the hosting

    Hello MC thank you for answering, I can understand everything but admit chese if a product does not exist instead of getting a 404 I get before a rederict 302. This has affected me for years since I removed the rewrite url. Now I've lost so many location on google ranking that I wonder why no one talks about it and nobody knows what to do to remove this rederict 302 before getting a 404.
    Giovanni,
    Zen Cart V2.1

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

    Default Re: path routing problem with the hosting

    Quote Originally Posted by diamond1 View Post
    Hello MC thank you for answering, I can understand everything but admit chese if a product does not exist instead of getting a 404 I get before a rederict 302. This has affected me for years since I removed the rewrite url. Now I've lost so many location on google ranking that I wonder why no one talks about it and nobody knows what to do to remove this rederict 302 before getting a 404.
    This is information that was not previously provided (among a number of other things that would lead to a solution). First of all, ZC (at least currently) only uses a 302 redirect within the paypalwpp.php file.... So, any 302 redirect other than an issue with paypal processing is brought on by something else on your system. One way to try to identify what code exists on your server that may offer the 302 redirect is from your admin, goto tools->Developers toolkit, then in the bottom left fill in 302, select catalog on the dropdown, then search... Haven't spoken about what version of ZC you are currently using, or perhaps so and I haven't gone through all of the posts specifically for that tidbit, but that search should identify includes/modules/payment/paypalwpp.php as having a 302 redirect and perhaps whatever else is causing yours. The next thing is that you said you "removed the rewrite url", you haven't identified which one was installed, and more than likely remnants of that url rewriter still exist on your system and that is a large part of what you are experiencing.

    The why others haven't? Well, they haven't come across the issue, haven't looked, or when they have attempted to do what is stated above about removal of the software they were successful at fully removing it. It is again one reason why the upgrade process (BTW 1.5.5.a is out now) suggests basically to do a clean install of the software, integrate the needed plugins and other minor software modifications so that old/unused plugins don't interact.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v154 (77) Problem with the SSL CA cert (path? access rights?) - Solved
    By nuganics in forum PayPal Express Checkout support
    Replies: 0
    Last Post: 28 Jan 2015, 02:23 AM
  2. Double Path Problem with BlueHost
    By cwhittaker in forum Installing on a Linux/Unix Server
    Replies: 15
    Last Post: 24 Jan 2010, 10:58 PM
  3. Hide side box with banner and Routing image
    By ryanb4614 in forum Basic Configuration
    Replies: 1
    Last Post: 14 Feb 2008, 03:37 AM
  4. help my physical path on Yahoo hosting
    By lina0962 in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 7 Jun 2006, 04:43 AM

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