At the beginning I tried SEO modules (free). But Google always had something to complain about. Error in the robots file or sitemap is not readable. A user told me that it is most likely due to the extension. I have now uninstalled this extension. Now there are more side activities to see, but they are not visitors.
I wonder how to set up htaccess, robots and sitemap properly. How do I best configure the files? I created sitemap via extensions feeds but also Google says that the sitemap cannot be read.
****************************
Code: Select all
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
</FilesMatch>
# 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 /
###############################################
## force https ##
## - ATTENTION: this force also admin pages! ##
###############################################
## non Cloud Systems
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## Cloud Systems
## e.g. CloudFlare, AWS Elastic Load Balancing, Heroku,
## OpenShift or any other Cloud/PaaS
# If we receive a forwarded http request from a proxy...
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
# ...or just a plain old http request directly from the client
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## force non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/simple_google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) 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]
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
php_value default_charset "UTF-8"
php_value memory_limit 64M
php_value max_execution_time 360
php_value upload_max_filesize 99M
php_value mysql.connect_timeout 20
php_flag session.auto_start Off
php_flag session.use_only_cookies On
php_flag session.use_cookies On
php_flag session.use_trans_sid Off
php_value session.cookie_httponly "1"
php_value session.gc_maxlifetime 3600
php_flag display_errors On
php_value max_input_time 60
php_value max_input_vars 4000
php_value post_max_size 8M
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
php_flag zlib.output_compression On
</IfModule>
<IfModule lsapi_module>
php_value default_charset "UTF-8"
php_value memory_limit 64M
php_value max_execution_time 360
php_value upload_max_filesize 99M
php_value mysql.connect_timeout 20
php_flag session.auto_start Off
php_flag session.use_only_cookies On
php_flag session.use_cookies On
php_flag session.use_trans_sid Off
php_value session.cookie_httponly "1"
php_value session.gc_maxlifetime 3600
php_flag display_errors On
php_value max_input_time 60
php_value max_input_vars 4000
php_value post_max_size 8M
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
php_flag zlib.output_compression On
</IfModule>
# END cPanel-generated php ini directives, do not edit
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
*******************************************
Is htaccess safe for the directories or is something still missing?
can someone help me?