Post by ljlau » Fri May 01, 2015 7:16 pm

opencart 2.0.2.0,apache2 installed ssl correctly,when I choose "use ssl Yes" and "use SEO urls Yes",index page was normally,but categories and products were all 404,no pages there.if choosed "use SEO urls No",products and catagories were all display correctly.

anyone can help?

Newbie

Posts

Joined
Fri May 01, 2015 7:03 pm

Post by yodapt » Fri May 01, 2015 9:05 pm

Have you edited the .htaccess file?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by ljlau » Fri May 01, 2015 9:40 pm

yodapt wrote:Have you edited the .htaccess file?
no I didn't.
how to edit .htaccess file? thx.

Newbie

Posts

Joined
Fri May 01, 2015 7:03 pm

Post by yodapt » Fri May 01, 2015 10:54 pm

Most of the time you dont need to edit the file, but you must ensure Apache is able to use the RewriteEngine, and in case you have your shop within domain folder(s), you must specify it on that file, changing the following line :

Code: Select all

RewriteBase /folder_path/


It is also possible, but unlikely, that the default .htaccess doesn't work properly in your Apache version, but there is no telling without troubleshooting your situation.

Try to disable SSL and see if the SEO URL works without it first.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by ljlau » Sat May 02, 2015 12:48 pm

yodapt wrote:Most of the time you dont need to edit the file, but you must ensure Apache is able to use the RewriteEngine, and in case you have your shop within domain folder(s), you must specify it on that file, changing the following line :

Code: Select all

RewriteBase /folder_path/


It is also possible, but unlikely, that the default .htaccess doesn't work properly in your Apache version, but there is no telling without troubleshooting your situation.

Try to disable SSL and see if the SEO URL works without it first.
I had did it.

I mean that when I disable SSL,products and categories are all correctly by using SEO URLs,when I use SSL and SEO urls,it doen't correcty.

thank you for your reply and sorry for my pool English.

Newbie

Posts

Joined
Fri May 01, 2015 7:03 pm

Post by bhraqnet » Sat May 02, 2015 1:11 pm

Enabling SSL in the OpenCart directory config.php file

Log into cPanel and go to File Manager
Navigate to your OpenCart installation directory
Open (Edit or Code Editor) the configuration file (config.php)
Look for the lines below // HTTPS that looks similar to this:

Code: Select all

define('HTTPS_SERVER', 'http://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'http://opencart.inmotiontesting.com/image/');
Edit the HTTPS settings to reflect your SSL URL path. For example:

Code: Select all

 define('HTTPS_SERVER', 'https://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'https://opencart.inmotiontesting.com/image/');

Save changes and close the config.php file

Enabling SSL in the OpenCart Admin folder config.php file

Go to the “Admin” folder
Open (Edit or Code Editor) the configuration file (config.php)
Look for the lines below // HTTPS that looks similar to this:

Code: Select all

define('HTTPS_SERVER', 'http://opencart.inmotiontesting.com/admin/');
define('HTTPS_CATALOG', 'http://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'http://opencart.inmotiontesting.com/image/');
Edit the HTTPS settings to reflect your SSL URL path. For example:

Code: Select all

define('HTTPS_SERVER', 'https://opencart.inmotiontesting.com/admin/');
define('HTTPS_CATALOG', 'https://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'https://opencart.inmotiontesting.com/image/');
Save changes and close the config.php file

Active Member

Posts

Joined
Thu Dec 26, 2013 11:16 pm

Post by ljlau » Sat May 02, 2015 6:52 pm

bhraqnet wrote:Enabling SSL in the OpenCart directory config.php file

Log into cPanel and go to File Manager
Navigate to your OpenCart installation directory
Open (Edit or Code Editor) the configuration file (config.php)
Look for the lines below // HTTPS that looks similar to this:

Code: Select all

define('HTTPS_SERVER', 'http://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'http://opencart.inmotiontesting.com/image/');
Edit the HTTPS settings to reflect your SSL URL path. For example:

Code: Select all

 define('HTTPS_SERVER', 'https://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'https://opencart.inmotiontesting.com/image/');

Save changes and close the config.php file

Enabling SSL in the OpenCart Admin folder config.php file

Go to the “Admin” folder
Open (Edit or Code Editor) the configuration file (config.php)
Look for the lines below // HTTPS that looks similar to this:

Code: Select all

define('HTTPS_SERVER', 'http://opencart.inmotiontesting.com/admin/');
define('HTTPS_CATALOG', 'http://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'http://opencart.inmotiontesting.com/image/');
Edit the HTTPS settings to reflect your SSL URL path. For example:

Code: Select all

define('HTTPS_SERVER', 'https://opencart.inmotiontesting.com/admin/');
define('HTTPS_CATALOG', 'https://opencart.inmotiontesting.com/');
define('HTTPS_IMAGE', 'https://opencart.inmotiontesting.com/image/');
Save changes and close the config.php file
I had already did this,but the categories and products still 404.

Newbie

Posts

Joined
Fri May 01, 2015 7:03 pm

Post by bhraqnet » Sat May 02, 2015 11:43 pm

It has experience
There is a programmatic error
open catd 2.0.2.0

Active Member

Posts

Joined
Thu Dec 26, 2013 11:16 pm

Post by bhraqnet » Sun May 03, 2015 8:04 pm

http://forum.opencart.com/viewtopic.php ... 06#p558706

Seems to be working, last question, do I not need rewritebase /

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

# SEO URL Settings
RewriteEngine On

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]

Active Member

Posts

Joined
Thu Dec 26, 2013 11:16 pm

Post by ljlau » Thu May 07, 2015 6:48 pm

bhraqnet wrote:http://forum.opencart.com/viewtopic.php ... 06#p558706

Seems to be working, last question, do I not need rewritebase /

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

# SEO URL Settings
RewriteEngine On

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]
I had tried this,but still 404...

thx

Newbie

Posts

Joined
Fri May 01, 2015 7:03 pm

Post by qahar » Fri May 08, 2015 12:58 am

ljlau wrote:opencart 2.0.2.0,apache2 installed ssl correctly,when I choose "use ssl Yes" and "use SEO urls Yes",index page was normally,but categories and products were all 404,no pages there.if choosed "use SEO urls No",products and catagories were all display correctly.

anyone can help?
First make sure it's .htaccess and not htaccess.txt
When SEO enabled, try to access product both with their url alias and full route url
What happen when you access information page by their url alias? you see the page or get 404?

If you use extensions with ocmod or vqmod try to disable them all.
It's to ensure extension you use is not causing this. Specialy if you use seo extension that might be misconfigured properly

User avatar
Expert Member

Posts

Joined
Tue Jun 29, 2010 10:24 pm
Location - Indonesia

Post by integris » Fri Jun 24, 2016 12:58 am

I ended up on this thread trying to find answers for getting an OC2.2 shop to work with SSL/https/www. I compiled a list of steps I had to take to get it working here: http://stackoverflow.com/questions/3627 ... t/37996993

Newbie

Posts

Joined
Wed May 18, 2016 4:14 am
Who is online

Users browsing this forum: No registered users and 56 guests