Post by hazymat » Mon Jun 21, 2010 12:18 pm

I just upgraded my 1.4.7 to 1.4.8 and now the front page of my store gives me an error message:

"The page you requested cannot be found".

(This error is rendered in center div within OpenCart itself.)

All other pages work fine. SEO URLs are turned on, and I have a .htaccess file in the root of my shop subdirectory, according to the instructions. It was definitely working before.

I have noticed that since I turned on SEO URLs and .htaccess when I was running 1.4.7, when I entered mydomain.com/shop/admin this would return a standard 404 error, until I tacked "/index.html" on to the URL.

I think the reason that my front page worked for me before was that by default, when 1.4.7 couldn't find a page, it redirected you to the front page... hence no visible problem.

I think my hosting provider is using ISAPI rewrite which does the exact same thing as mod_rewrite, and it's designed to be fully compatible with the .htaccess files.

Can anyone throw some light on this?

Alternatively, can someone help me reverse the change in 1.4.8 that added this functionality of returning "The page you requested cannot be found" error?

Thanks!

New member

Posts

Joined
Mon Oct 05, 2009 2:25 am

Post by hazymat » Mon Jun 21, 2010 6:28 pm

So to summarise, my .htaccess file is (obviously) renamed correctly to .htaccess, and looks like this:

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks
RewriteEngine On
RewriteBase /shop/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
And the "Use SEO URLs" setting is turned on.

And I'm getting "page not found" when I browse to mydomain.com/shop

However it works fine when I enter mydomain.com/shop/index.php

This broke for me since upgrade to 1.4.8

Please help!

New member

Posts

Joined
Mon Oct 05, 2009 2:25 am

Post by jgw1 » Mon Jun 21, 2010 7:49 pm

I find that if I have an SEO problem this is normally resolved by purging the url to seo table in the sql database and setting up the SEO's again.

New member

Posts

Joined
Tue Apr 20, 2010 5:22 pm

Post by hazymat » Tue Jun 22, 2010 1:39 am

Hi

Thanks for the suggestion. The database table url_alias doesn't have an entry for the root of the shop, mydomain.com/shop/

It only stores aliases for product pages, categories, info pages, etc.

Can anyone else help? This is driving me nuts!

I'm sure it's not an issue with OpenCart itself, and I think it can be solved by adding a line into the .htaccess file, I'm just clueless when it comes to .htaccess though!

New member

Posts

Joined
Mon Oct 05, 2009 2:25 am

Post by hazymat » Tue Jun 22, 2010 4:15 am

Here's what's happening on my store

http://www.matsmithphotography.com/shop/

I've figured the best way to temporarily fix this is to put a message in my theme to reassure visitors the store is still online, but I was really hoping someone could help me get to the bottom of this issue.

I'd really appreciate any help right now.

Many thanks

M

New member

Posts

Joined
Mon Oct 05, 2009 2:25 am

Post by hazymat » Wed Jun 23, 2010 6:32 pm

Can anyone help?

I just need a way of turning off "not found" page, so that pages redirect to my shop home.

Otherwise, the front page of my cart is not working with my hosting provider!

Thanks

New member

Posts

Joined
Mon Oct 05, 2009 2:25 am

Post by Moggin » Wed Jun 23, 2010 10:09 pm

...what happens when you disable .htaccess, ie put the .txt extension back on the file. Worse or better? It's a shot in the dark, but a worthwhile experiment pending more expert help (disable SEO in the admin panel too).

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by Moggin » Wed Jun 23, 2010 10:25 pm

...also, my htaccess file for (v1.4.8 ) contains more entries than yours:

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing 
Options -Indexes

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

# SEO URL Settings
RewriteEngine On
RewriteBase /shop/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)?*$ index.php?_route_=$1 [L,QSA] 
...perhaps this is relevant. But I can see that http://www.matsmithphotography.com/shop/ throws the error, and
http://www.matsmithphotography.com/shop ... ommon/home doesn't...

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by hazymat » Wed Jun 23, 2010 11:26 pm

Hey Moggin

Thanks for your suggestions. Very useful.

1. I can disable .htaccess and SEO but I really need to fix it as marketing emails previously sent out link directly to various categories. May have to use this as a fallback.

2. I didn't realise the new version of .htaccess included in 1.4.8 was different.

The new version of .htaccess doesn't work for me at all...

... until I add the slash that was taken out in the new version:

RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

... then SEO works again.

Unfortunately I still have the same problem though!

I am *convinced* this problem can be solved by an amended .htaccess file, I have played with it for ages but still no luck.

REALLY could do with some help from an .htaccess genius right now - or anyone who has a good command of regex...

New member

Posts

Joined
Mon Oct 05, 2009 2:25 am

Post by Qphoria » Wed Jun 23, 2010 11:33 pm

Not sure why it doesn't work for you.. but try this:

1. EDIT: catalog/controller/common/seo_url.php

2. FIND & REMOVE:

Code: Select all

$this->request->get['route'] = 'error/not_found';    
 

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hazymat » Wed Jun 23, 2010 11:42 pm

Qphoria wrote:Not sure why it doesn't work for you.. but try this:

1. EDIT: catalog/controller/common/seo_url.php

2. FIND & REMOVE:

Code: Select all

$this->request->get['route'] = 'error/not_found';    
 
Dear Qphoria

Can I buy you a beer?

Muchos happy now! It worked.

THANKS!

New member

Posts

Joined
Mon Oct 05, 2009 2:25 am

Post by Moggin » Thu Jun 24, 2010 12:02 am

hazymat wrote: I am *convinced* this problem can be solved by an amended .htaccess file..
LOL so was I...we were both wrong! Qphoria = the best :)

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by Qphoria » Thu Jun 24, 2010 12:05 am

Doesn't explain why only you have the issue.. so it might still be an htaccess issue.. but this will at least get you running

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by marky » Fri Jun 25, 2010 3:09 pm

Hi,

Same problem here... I have just upgrade from 1.4.7 to 1.4.8b and none of my SEO urls work now, I get page not found. If I turn off SEO in settings the cats/prods work fine. and the $this->request->get['route'] = 'error/not_found';
doesn't fix the issue. see my htaccess code:

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

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

# SEO URL Settings
RewriteEngine On
RewriteBase /newshop/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]

Anyone help as I need to get this working with SEO urls.

Thanks
Mark

Newbie

Posts

Joined
Wed Apr 07, 2010 1:58 pm
Who is online

Users browsing this forum: No registered users and 38 guests