Post by martandbiniwale » Mon May 25, 2020 10:55 pm

Hi,

After I enable Seo URL in admin there is an error Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I have read Articles and tried to solve the problem but I am not able to solve it.

.htaccess details

Code: Select all

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

RewriteBase /mywebiste.com/
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 %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://www.mywebiste.com%{REQUEST_URI} [R=301,L,NE]


Posts

Joined
Mon May 25, 2020 4:32 pm

Post by OSWorX » Tue May 26, 2020 12:30 am

Is the installation really located in a subfolder?

Code: Select all

RewriteBase /mywebiste.com/
Because if NOT, use only:

Code: Select all

RewriteBase /

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by MrunaL123 » Wed May 27, 2020 4:37 pm

Is it working...?
because I am also facing the same issue?

Newbie

Posts

Joined
Wed May 27, 2020 4:34 pm

Post by martandbiniwale » Thu May 28, 2020 10:34 pm

OSWorX wrote:
Tue May 26, 2020 12:30 am
Is the installation really located in a subfolder?

Code: Select all

RewriteBase /mywebiste.com/
Because if NOT, use only:

Code: Select all

RewriteBase /
Hello,

Yes tried Both ways still it's not working


Posts

Joined
Mon May 25, 2020 4:32 pm

Post by martandbiniwale » Thu May 28, 2020 10:35 pm

MrunaL123 wrote:
Wed May 27, 2020 4:37 pm
Is it working...?
because I am also facing the same issue?
Not Yet.


Posts

Joined
Mon May 25, 2020 4:32 pm

Post by OSWorX » Thu May 28, 2020 11:17 pm

Okay, what about if all of you try the "original" once and tell if it works:

Code: Select all

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteBase /

RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/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]
No further "custom" lines and other stuff!

And - I assume that all of you have this:
1. *nix-Server > NO Win*-crap
2. renamed the .htaccess.txt to .htaccess > must be located in the root folder
3. enabled in the backend the SEO-Setting (something like "Use SEO-Url" under the Tab System)

If after all of that it does further not work, post a request in the Commercial Forum here, or contact the official OpenCart Support or hire a developer you trust.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by martandbiniwale » Mon Jun 01, 2020 1:22 am

OSWorX wrote:
Thu May 28, 2020 11:17 pm
Okay, what about if all of you try the "original" once and tell if it works:

Code: Select all

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteBase /

RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/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]
No further "custom" lines and other stuff!

And - I assume that all of you have this:
1. *nix-Server > NO Win*-crap
2. renamed the .htaccess.txt to .htaccess > must be located in the root folder
3. enabled in the backend the SEO-Setting (something like "Use SEO-Url" under the Tab System)

If after all of that it does further not work, post a request in the Commercial Forum here, or contact the official OpenCart Support or hire a developer you trust.
Hi,

It Works But then I am not able to redirect http to https


Posts

Joined
Mon May 25, 2020 4:32 pm

Post by OSWorX » Mon Jun 01, 2020 4:00 pm

martandbiniwale wrote:
Mon Jun 01, 2020 1:22 am
It Works But then I am not able to redirect http to https
Fine!
But has nothing todo with the starting question "Seo Url not working .."

You can do a search in this forum - there are several threads how to enable the force http > https
Second, if you are not able to find this 500+ entries, create a new thread with the proper question.

Just 2 solutions you can try:

Code: Select all

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
or

Code: Select all

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://YOUR_URL_HERE/$1 [R,L]

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by martandbiniwale » Mon Jun 01, 2020 5:52 pm

OSWorX wrote:
Mon Jun 01, 2020 4:00 pm
martandbiniwale wrote:
Mon Jun 01, 2020 1:22 am
It Works But then I am not able to redirect http to https
Fine!
But has nothing todo with the starting question "Seo Url not working .."

You can do a search in this forum - there are several threads how to enable the force http > https
Second, if you are not able to find this 500+ entries, create a new thread with the proper question.

Just 2 solutions you can try:

Code: Select all

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
or

Code: Select all

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://YOUR_URL_HERE/$1 [R,L]
Hi Thanks a lot !!!
The Redirect is now working.


Posts

Joined
Mon May 25, 2020 4:32 pm

Post by karimzi_academy » Tue Jun 15, 2021 2:05 pm

I have also face same problem. then I was follow this step https://karimzi.blogspot.com/2021/06/op ... rking.html now work.


Posts

Joined
Thu Jun 03, 2021 12:41 am

Post by SolidSnake » Fri May 19, 2023 12:42 am

Many thanks!
This thread also helped me out with OpenCart 3.0.3.6 on a CPanel + LiteSpeed server configuration.

I just had to add this for the caching to work:

Code: Select all

### LITESPEED_CACHE_START - Do not remove this line
<IfModule LiteSpeed>
CacheLookup on
</IfModule>
### LITESPEED_CACHE_END
...and the first suggestion by OSWorX on the HTTPS redirect within "<IfModule mod_rewrite.c>....</IfModule>" and after the "RewriteBase /" line :

Code: Select all

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Newbie

Posts

Joined
Sun Nov 24, 2019 5:59 am
Who is online

Users browsing this forum: No registered users and 162 guests