Customer Log In causes 404 error which clears when I click "Back" in browser.
Hi,
Here’s a strange issue…
On each page of my site there are two links to the customer account login page.
The first is the standard “Log In” link in the header.
The second is an additional “Log In” link I have added to the top right sidebox.
(Please see: http://www.futuregarageservices.co.uk/shop/)
If I go to the login page via the link I created in the top right hand sidebox, I can access my customer account with no issues.
However, if I go to the login page via the link in the header, at first the server returns a “404 page not found” error - but when I click my browser’s back button I’m then logged into my account.
Any ideas as to why this is happening?
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
Podgeminster
However, if I go to the login page via the link in the header, at first the server returns a “404 page not found” error - but when I click my browser’s back button I’m then logged into my account.
Any ideas as to why this is happening?
I'm not getting this 404 at all??? Anyone else?
Cheers
RodG
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
Podgeminster
Hi,
Here’s a strange issue…
On each page of my site there are two links to the customer account login page.
The first is the standard “Log In” link in the header.
The second is an additional “Log In” link I have added to the top right sidebox.
(Please see:
http://www.futuregarageservices.co.uk/shop/)
If I go to the login page via the link I created in the top right hand sidebox, I can access my customer account with no issues.
However, if I go to the login page via the link in the header, at first the server returns a “404 page not found” error - but when I click my browser’s back button I’m then logged into my account.
Any ideas as to why this is happening?
It works fine on my end. No Errors.
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Recently make any configuration changes and not cleared your browser's cache/cookies?
Could also try another browser on the same computer or perhaps identify which browser(s) were tried.
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
Podgeminster
Hi,
Here’s a strange issue…
On each page of my site there are two links to the customer account login page.
The first is the standard “Log In” link in the header.
Do you have a zenid hard-coded to the link? It always seems to have a zenid ending with "dmukd0". The "Contact Us" link in the sidebox also has the same zenid.
Look also in: Admin -> Configuration -> Sessions
Cookie Domain
Force Cookie Use
- make sure they both say True
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Sorry… having just read back my first post I realise I didn’t explain the issue fully and accurately.
I should have described it as follows:
If I go to the login page via the link I created in the top right hand sidebox, enter my login details and login, I can access my customer account with no issues.
However, if I go to the login page via the link in the header, enter my login details and login, at first the server returns a “404 page not found” error - but when I click my browser’s back button I’m then logged into my account and taken to my “My Account Information” page.
If you have the time to help and would like to see this error in action, you’ll have to create an account please.
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
Podgeminster
Sorry… having just read back my first post I realise I didn’t explain the issue fully and accurately.
I should have described it as follows:
If I go to the login page via the link I created in the top right hand sidebox, enter my login details and login, I can access my customer account with no issues.
However, if I go to the login page via the link in the header, enter my login details and login, at first the server returns a “404 page not found” error - but when I click my browser’s back button I’m then logged into my account and taken to my “My Account Information” page.
If you have the time to help and would like to see this error in action, you’ll have to create an account please.
Ok, I know your problem. Check in your .htaccess file make your sure that your domain is https://www.futuregarageservices.co.uk/shop/ not http://www.futuregarageservices.co.uk/shop/.
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
wmorris
Thanks for the advice - you're right - it is an .htaccess issue...
I'm using the Ultimate URLs plugin - I'm certain the issue is in the .htaccess file the plugin utilises because the "Not Found" issue goes away when the plugin is deactivated.
The .htaccess file is provided with the plugin and has not been altered / edited but obviously needs to be tweaked - any ideas?
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
Podgeminster
Thanks for the advice - you're right - it is an .htaccess issue...
I'm using the Ultimate URLs plugin - I'm certain the issue is in the .htaccess file the plugin utilises because the "Not Found" issue goes away when the plugin is deactivated.
The .htaccess file is provided with the plugin and has not been altered / edited but obviously needs to be tweaked - any ideas?
Ok, you should see another .htaccess file called .htaccess. bAK for you ultimate URL copy the whole code inside that then paste it in the .htaccess file under the that original code. Then it should work.
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
wmorris
Ok, you should see another .htaccess file called .htaccess. bAK for you ultimate URL copy the whole code inside that then paste it in the .htaccess file under the that original code. Then it should work.
Hmmm... there is no other .htaccess file in that folder... perhaps I deleted it? There doesn't seem to be a copy in the original source code either - I guess this is created during the installation process?
There are .htaccess files in other folders though - do any of those contain the code I need so I can copy and paste?
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Quote:
Originally Posted by
Podgeminster
Hmmm... there is no other .htaccess file in that folder... perhaps I deleted it? There doesn't seem to be a copy in the original source code either - I guess this is created during the installation process?
There are .htaccess files in other folders though - do any of those contain the code I need so I can copy and paste?
Ok, open your .htaccess file then paste this code below:
Code:
# Always use https for secure connections
# Replace 'www.example.com' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$https://www.futuregarageservices.co.uk/shop/$1 [R=301,L]
###############################################################################
# Add custom headers and options
###############################################################################
# Notes:
#
# Examples: Adding IE compatibility / edge flags, language and encoding flags,
# php or suphp directives, configure other Apache modules such as page_speed,
# and enable or disable Apache httpd options.
#
# Do NOT configure anything directly relating to physical or virtual resources
# in this section. These should be addressed later on in this file.
###############################################################################
#Options -Indexes
###############################################################################
# Enable mod_rewrite processing using the rules in this .htaccess file
###############################################################################
# Notes:
#
# <IfModule> should be avoided at all costs. If mod_rewrite is not available
# it is almost always better to return HTTP 500 status. This way we see there
# is an issue as soon as the .htaccess file is uploaded.
#
# For mod_rewrite to work, the Apache server option to allow symbolic links to
# be followed must be enabled. Most providers supporting mod_rewrite will
# already have it enabled for you, but if your rewrite rules are not working
# you can un-comment the first directive below to manually enable the option.
#
# Don't forget, mod_rewrite directives are processed in order until a matching
# RewriteRule with the [L] flag is encountered. So the more specific a rule is
# the closer it should appear to the top of this file.
###############################################################################
#Options +FollowSymLinks
RewriteEngine on
###############################################################################
# Tell mod_rewrite where this file is relative to the server document_root
###############################################################################
# Notes:
#
# This directive should only be enabled if this .htaccess file is not placed
# in the document_root (usually public_html, www, or web) of the (sub)domain.
#
# An easy way to determine the location relative to the server document_root is
# to look at the URL used to access a file in this folder. For example if you
# access a "page" in the same folder as this file by typing in the URL
# "www.mydomain.com/myfolder/index.html" then "myfolder" will be the location
# of this file relative to the server document_root.
#
# Another quick and easy way to determine the correct setting for this is to
# look at the defined value for DIR_WS_CATALOG and DIR_WS_HTTPS_CATALOG in
# Zen Cart's configure.php files. All three values should match.
#
# Don't forget the leading and trailing /. This directive requires both!
###############################################################################
#RewriteBase /shop/
###############################################################################
# Redirect if request was for index.php (no query)
###############################################################################
# Notes:
#
# This is only required if the site generates references to index.php with no
# parameters. This rule will force a 301 redirect to the site root when a
# request is made for "/index.php" with no query terms (?key=value).
###############################################################################
#RewriteCond %{QUERY_STRING} ^$
#RewriteRule ^index\.php$ / [R=301,L]
###############################################################################
# Add any custom 301 redirects
###############################################################################
# Notes:
#
# In general these should be few and far between. If you use a RewriteRule
# be sure to add the L flag to let Apache mod_rewrite know to stop processing
# and skip any RewriteRules defined later in the .htaccess file.
###############################################################################
###############################################################################
# Redirect if request was for index.php (with or without query)
###############################################################################
# Notes:
#
# This is a performance optimization. If the request is for index.php simply
# pass the request on and do not process any other mod_rewrite directives in
# this file.
#
# Basically this avoids the overhead of checking if index.php is a real file
# or directory (used in subsequent mod_rewrite rules) before sending the
# request to index.php.
###############################################################################
RewriteRule ^index\.php$ - [L]
###############################################################################
# Start Ultimate (SEO) URLs
###############################################################################
# Notes:
#
# You should not make any changes in this section unless you really understand
# how it will impact your web site. Mistakes can break things.
###############################################################################
# Handles the new URL formats
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
# Original (unchanged) URL formats
RewriteRule ^(.*)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-m-([0-9]+)(.*)$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)(.*)$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-c-([0-9_]+)(.*)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Rewrite all other requests (if the file / directory does not exist)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]
###############################################################################
# Add any other directives relating to the handling of physical files
###############################################################################
# Notes:
#
# If processing makes it this far, the request was for a real file or folder.
# Example: Adding further processing related to browser caching or security.
###############################################################################
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Thank you wmorris! Problem now solved… but not in the way you’d expect!
In short, I’m now feeling pretty stupid… allow me to explain…
I used WinMerge to compare your .htacces file with my existing .htaccess file. Besides the extra code at the top, I immediately noticed that several lines of your code were commented out with “#”. I then suddenly remembered that several months ago I removed several of “#” whilst investigating a separate issue (which I have since resolved) but forgot to go back and re-comment out those sections of code!
The additional code at the top of the file:
Quote:
Originally Posted by
wmorris
Ok, open your .htaccess file then paste this code below:
Code:
# Always use https for secure connections
# Replace 'www.example.com' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$https............................................................
… wasn’t necessary in the end.
Apologies for leading you down the wrong path – you have solved my problem – just not in the way you thought you had!
The lesson I’ve learned? If you’re changing core files, KEEP A RECORD!
Re: Customer Log In causes 404 error which clears when I click "Back" in browser.
Thank you wmorris! Problem now solved… but not in the way you’d expect!
In short, I’m now feeling pretty stupid… allow me to explain…
I used WinMerge to compare your .htacces file with my existing .htaccess file. Besides the extra code at the top, I immediately noticed that several lines of your code were commented out with “#”. I then suddenly remembered that several months ago I removed several of “#” whilst investigating a separate issue (which I have since resolved) but forgot to go back and re-comment out those sections of code!
The additional code at the top of the file:
Quote:
Originally Posted by
wmorris
Ok, open your .htaccess file then paste this code below:
Code:
# Always use https for secure connections
# Replace 'www.example.com' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$https............................................................
… wasn’t necessary in the end.
Apologies for leading you down the wrong path – you have solved my problem – just not in the way you thought you had!
The lesson I’ve learned? If you’re changing core files, KEEP A RECORD!