OpenCart-Hellas 

Η Ελληνική κοινότητα υποστήριξης του Opencart

Θέματα που αφορούν τη γενικότερη λειτουργία του Opencart.
Από spyros
#5992
Καλημερα σας θα ηθελα την βοηθεια σας ψαχνω τον κωδικα για το htacess εχω κανει install ενα opencart ως https://domain.com και θελω να κανω redirect ολα τα http:// και το https://www στο https:// ευχαριστω εκ των προτερων
Άβαταρ μέλους
Από botonakis
#5994
Η λύση σε αυτό που ψάχνεις υπάρχει παντού στο ιντερνετ.

Ανοίγεις το αρχείο .htaccess

Βρίσκεις τις γραμμές:
Κώδικας: Επιλογή όλων
RewriteEngine On
RewriteBase /
και τις αντικαθιστάς με το παρακάτω:
Κώδικας: Επιλογή όλων
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://www.domain.gr%{REQUEST_URI} [R=301,L,NE]
RewriteBase /
Στον παραπάνω κώδικα, αντικαθιστάς το domain.gr με το δικό σου domain name.
Άβαταρ μέλους
Από botonakis
#6001
Κάτι λάθος κάνεις στις αλλαγές του αρχείου. Για να "κρεμάσει" σημαίνει ότι υπάρχει λάθος. Κάνε copy-paste το τωρινό σου htaccess εδώ να δούμε τι έξτρα αλλαγές έχεις.

Όσο για το να κάνει redirect σε όχι www. η αλλαγή είναι η αντίστοιχη:
Κώδικας: Επιλογή όλων
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://domain.gr%{REQUEST_URI} [R=301,L,NE]
RewriteBase /
ΥΣ: Εάν έχεις ήδη άλλο κώδικα που κάνει redirection, είτε σε άλλο αρχείο είτε μέσα στο .htaccess , το πιο πιθανό είναι η σελίδα σου να σταματήσει να λειτουργεί γιατί δημιουργείς infinate redirection loop.
Από spyros
#6002
σε ευχαριστω αφανταστα για την βοηθεια εκανα την αλλαγη που ανεφερες αλλα δεν λειτουργει σου στελνω το αρχειο ολο μαζι με την αλλαγη
Κώδικας: Επιλογή όλων
# 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 "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
 Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://vaporstore.eu%{REQUEST_URI} [R=301,L,NE]
RewriteBase /
# 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=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]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none
Από spyros
#6004
το αφερεσα αλλα δεν λειτουργει ο κωδικας εχει ως εξης
Κώδικας: Επιλογή όλων
# 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 "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*) https://vaporstore.eu%{REQUEST_URI} [R=301,L,NE]
RewriteBase /
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

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]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none
Άβαταρ μέλους
Από botonakis
#6005
όπως θα δείς στην εικόνα του site σου:
Screenshot 2019-10-11 at 10.46.11.png
Είναι το πρόβλημα που σου ανέφερα πιο πάνω. Too Many Redirects.
Κάπου λοιπόν έχεις βάλει κώδικα που κάνει redirection σε www. ή σε κάτι άλλο. Συνήθως αυτό το κάνουν κάποια SEO plugins ή καρφωτός κώδικας στο /config.php
Πρέπει να συνδεθείτε για να δείτε τα συνημμένα αρχεία σε αυτήν τη δημοσίευση.
Σύνδεση με Epsilonet smart

Και εμενα θα με ενδιεφερε κατι τετοιο!!!

SMS Provider

Καλησπέρα, Σκοπεύω να στέλνω sms στους πελάτες για[…]

Πριν ζητήσετε βοήθεια στο φόρουμ, παρακαλούμε ελέγξτε αν υπάρχει έτοιμη λύση στο OpenCart Extension Marketplace!