Page 1 of 1

Error 404 on existing page

Posted: Wed Dec 14, 2016 4:24 am
by kgg.becks
Hello,

Firstly as a new user I would like to say hi to Opencart community.
Now to the problem.....Sometime on my site https://ka-store.co.uk I get 404 error on a page that definetly exist. After I get that error I refresh the page and loads normally. Any idea what can cause that error?
My Opencart Version is 2.3.0.2.
Thanks very much

Re: Error 404 on existing page

Posted: Wed Dec 14, 2016 5:32 am
by uksitebuilder
Very strange. It does take a while for your homepage to load.

What is the contents of your .htaccess file (if enabled) ?

Re: Error 404 on existing page

Posted: Wed Dec 14, 2016 5:33 am
by kgg.becks
uksitebuilder wrote:Very strange. It does take a while for your homepage to load.

What is the contents of your .htaccess file (if enabled) ?
Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
#RewriteCond %{HTTPS} on
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#SSL Port
RewriteCond %{SERVER_PORT} !=443

# Remove www. from any domain query
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,L]

# All broswer request get redirected to HTTPS
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

#Force non-www:
RewriteCond %{HTTP_HOST} ^www\.ka-store\.co.uk [NC]
RewriteRule ^(.*)$ https://ka-store.co.uk/$1 [L,R=301]

Re: Error 404 on existing page

Posted: Wed Dec 14, 2016 5:42 am
by uksitebuilder
Seems a little messy

Backup that file and try replacing with the following

Code: Select all

Options +FollowSymlinks
Options -Indexes

<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

RewriteEngine On
RewriteBase /

RewriteCond %{SERVER_PORT} !=443
RewriteRule ^(.*)$ https://ka-store.co.uk/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^ka-store\.co\.uk$
RewriteRule ^(.*)$ https://ka-store.co.uk/$1 [R=301,L]

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Re: Error 404 on existing page

Posted: Wed Dec 14, 2016 5:50 am
by kgg.becks
Done......but still doing that error. ???
The thing is if it was showing some error would be easier. With normal 404 page is not possible to track the problem :(

Re: Error 404 on existing page

Posted: Wed Dec 14, 2016 5:53 am
by uksitebuilder
Yah, 404 is unhelpful
I had a similar problem earlier today with a server that was running suPHP via .htaccess and it wasn't needed

Try removing the first line of that .htaccess file.

Failing that, you may need the assistance of your server host

Re: Error 404 on existing page

Posted: Wed Dec 14, 2016 5:57 am
by kgg.becks
Still the same...I will give them a shout to see if they can see more than me. I will keep you posted. Thanks for your help.

Re: Error 404 on existing page

Posted: Sun Dec 18, 2016 12:19 am
by kgg.becks
uksitebuilder...

As promosed to update you on my case .... I have fixed the problem. The problem was in the theme that I have choosen. As the theme was with loads of extensions included I suspect somewhere somthing was not working as it should be. And I didn't even need all of them. Now I'm using the default opencart theme and the website is working much faster and without any errors.

Re: Error 404 on existing page

Posted: Sun Dec 18, 2016 12:21 am
by uksitebuilder
Thanks for the update.

Can you advise what the theme was called please for future reference.

Re: Error 404 on existing page

Posted: Sun Dec 18, 2016 2:32 am
by kgg.becks
uksitebuilder wrote:Thanks for the update.

Can you advise what the theme was called please for future reference.
Yeah of course, SO Shoppy from Magentech