Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    Feb 2013
    Location
    Green Valley, Arizona, United States
    Posts
    21
    Plugin Contributions
    0

    Default Re: .htaccess and Admin Area Problem

    I did put it only in that one.

  2. #12
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: .htaccess and Admin Area Problem

    Glad you were able to get things sorted. I just stumbled across this thread... One of the major problems you were encountering is because the RewriteRule your hosting provider gave you causes a 301 redirect even if POST data is present.

    This is one of many mistakes people make when working with 301 redirects. Issuing a 301 redirect for a request containing POST data will result in loss of the POST data. This is why you were seeing "ERROR: The data you submitted was found to be empty. YOUR CHANGES HAVE *NOT* BEEN SAVED. You may have a problem with your browser or your internet connection".

    As other people on here already mentioned, the correct fix is to change the configure.php files so Zen Cart generates links starting with the protocol, server name, and other information correctly the first time - with no 301 redirects needed.

    If you must redirect the first request to your website in case someone does not type the "www."... The following would be better:
    Code:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{HTTP_HOST} ^sanguinarius\.org$ [NC]
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteRule ^.*$ http://www\.%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L]
    
    RewriteCond %{SERVER_PORT} 443
    RewriteCond %{HTTP_HOST} ^sanguinarius\.org$ [NC]
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteRule ^.*$ https://www\.%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L]
    In most cases only the first block will be the only block needed. Keep in mind as well not all servers support checking %{SERVER_PORT}. Again, this would only be needed to catch the first page (as the links would contain what is in your configure.php files) when someone manually typed in your address - or - links from another site (adwords, search engines, etc) did not have the "www." prefix.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Ultimate SEO .htaccess problem and broken Admin interface
    By erint29 in forum All Other Contributions/Addons
    Replies: 33
    Last Post: 27 Aug 2012, 06:56 PM
  2. Admin area and limiting by IP with HTAccess?
    By Profile90909 in forum General Questions
    Replies: 8
    Last Post: 10 Jun 2011, 01:24 PM
  3. Admin area not displaying stylesheet? (fasthosts & .htaccess fun I think...)
    By yelow in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Dec 2008, 07:56 PM
  4. Cannot access admin area after .htaccess directory - gives me page not found
    By immersive in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 30 Oct 2008, 10: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