Page 1 of 1

404 Not Found Error

Posted: Sat Jan 31, 2015 10:56 pm
by Len77
Hello,

I'd like to ask whether you can help me please fix this problem below.

I can' access products and categories when I click on them from my home page.

I'm getting this message:
"The requested URL /Organic-Loose-Leaf-Teas was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."


Thank you very much in advance for your kind help.

Regards,
Len

Re: 404 Not Found Error

Posted: Sat Jan 31, 2015 10:57 pm
by labeshops
The most common error that causes this is forgetting to add a trailing / at the end of your url in settings, so I would check that first. Make sure you have http://www.yourdomain.com/ and NOT http://www.yourdomain.com

Re: 404 Not Found Error

Posted: Sun Feb 01, 2015 1:55 pm
by fido-x
Have you renamed the .htaccess.txt file that came with your OpenCart package to .htaccess?

Do you have the same issue with SEO URLs turned off?

Re: 404 Not Found Error

Posted: Wed Feb 04, 2015 2:44 pm
by Len77
Hello,

In my admin settings I have URL as follows:
http://bioaorganic.com/
It's without the "www". May that be kept like that?

I checked for the .htaccess.txt in FTP. I have the file changed to .htaccess. In my admin it was set to "SEO URLS turned ON". I turned it off. Now the "404 not found error" isn't there anymore.
I'd like to ask whether I have to keep the settings this way, or I have to change the .htaccess file back to .htaccess.txt file? Also, I'd like to keep SEO URL on the site. Would you kindly recommend how I could keep the SEO URL and not have the 404 error if possible?

Thank you very much.

Regards,
Len

Re: 404 Not Found Error (w/SEO url enabled)

Posted: Sat Apr 11, 2015 3:24 am
by StormDesigner
Before I go to far into monkeying around with this I'm hoping the forum can help. I'm hosting a client within a reseller shared environment on Bluehost (meh) and the SEO URL's aren't working. I verified with tech support that mod-rewrite is enabled. I also saw something on on a post for OC v1.5.x indicating updating code in the htaccess. file.

What I've done so far is
1. changed the setting in oc admin
2. changed the name of the ".htaccess.txt" to ".htaccess."

The cart is built in a subdirectory called "/tacklebox" as opposed to root, not sure if that plays a part.
My guess is that I need to make a modify to the .htaccess. file. Anyone know for sure?

Re: 404 Not Found Error

Posted: Sat Apr 11, 2015 3:36 am
by OSWorX
Hopefully NOT

Code: Select all

.htaccess.
Because it should be .htaccess only

Re: 404 Not Found Error

Posted: Sat Apr 11, 2015 5:24 am
by StormDesigner
Thanks OSXworx, that helped but now instead of a 404 error it is displaying the home page content of the root site without graphics or the css file linked? Wondering if there is something in the htaccess file (now correctly named as ".htaccess" which would more correctly route the page by seo-name to the ID#?
NEVERMIND!!I figured it out, went to .htaccess and edited line #31.

Code: Select all

Was: RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Changed to: RewriteRule ^([^?]*) SUBDIRECTORY/index.php?_route_=$1 [L,QSA]
Just added "the sub-directory name" we're using ahead of the index.php so it knows where to look.
Like a charm! Thanks for info on renaming the file, I hope this helps some folks. Good luck.
While at it let's charge this for SEO "How come SEO URL Names aren't working in OpenCart 2.0?"

Re: 404 Not Found Error

Posted: Sat Apr 11, 2015 3:17 pm
by OSWorX
Instead of adding some subdirectories you should change the line above.
Standard is:

Code: Select all

RewriteBase /
So, if you shop is located in a subdirectory, this line should be:

Code: Select all

RewriteBase /subdirectory/
where subdirectory the name of your subdirectory is ..

Re: 404 Not Found Error

Posted: Sat Apr 11, 2015 11:54 pm
by StormDesigner
Interesting, so changing line #24 would also have fixed this also, how is that better than the modification to line #30?

Re: 404 Not Found Error

Posted: Sun Apr 12, 2015 12:46 am
by OSWorX
StormDesigner wrote:Interesting, so changing line #24 would also have fixed this also, how is that better than the modification to line #30?
Because that is the 'normal' way.
Do not forget, doing it that way, additional services rely on it.
Doing it your way, is not a good idea.
Fact.

Re: 404 Not Found Error

Posted: Sun Apr 12, 2015 3:42 am
by StormDesigner
OSWorX wrote: Do not forget, doing it that way, additional services rely on it.
Fact.
That's what I was thinking, my way worked in this context but there could be other areas where my way breaks but I wouldn't know until I got there. Thanks for the good Fact.
GREATLY appreciated.
:ok: Sometimes I prefer not to have to learn the hard way.
And now this (line 22) makes more sense to me:

Code: Select all

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

:rtfm:

Re: 404 Not Found Error

Posted: Tue Nov 24, 2015 6:46 am
by stevedurko
Hi,

I've the almost same issue, 404, access denied errors are increasing everyday. http://awesomescreenshot.com/0ce5ffdt82 can anyone help how to fix?