-
HTTPS non funziona
Allora, ho il forum MyBB sulla root principale e Wordpress sulla cartella Blog
quindi in questo caso ho 2 file htaccess uno per il forum sulla root principale e uno per wordpress sulla cartella blog.
Sul pannello di controllo Altervista ho attivato HTTPS e poi sul forum MyBB ho attivato cookies sicuri.
Mentre su Wordpress ho attivato il plugin force SSL.
In entrambe i casi non funziona
Ho provato as inserire il codice su htaacces della root principale ma non funziona.
Cosa devo fare ?
-
Salve,
laversione https è funzionante, ma coesiste con la versione http. L'unica cosa che si può fare per far caricare sempre da https, è un redirect 301 dalla versione http a quella https. Per farlo, bisogna inserire il redirect nel file htaccess.
Redirect:
Codice:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.meteoforum\.altervista\.org$
RewriteRule (.*) https://www\.meteoforum\.altervista\.org/$1 [R=301,L]
Comunque, le consiglio di prestare attenzione a ciò, dopo che sia stato rsisolto l'altro suo problema.
Cordiali saluti.
-
Inserendo il codice l'estensione diventa Https ma le pagine non si aprono
-
Altra cosa da dire è che il file htaccess fino a ieri era pieno di codice, ora c'è solo la scritta:
av:Toolbar
SetEnv AV_TOOLBAR 0
forse ho cliccato su reset.
Va bene lo stesso così o bisogna riportare tutto quello che c'era scritto prima ?
-
Per il redirect provi in questo modo:
Codice:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule .* https://meteoforum.altervista.org%{REQUEST_URI} [L,R=301]
Mi pare strano, l'htaccess dovrebbe essere qualcosa simile a questo:
Codice:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
SetEnv AV_WP_SKIP_XMLRPC off
# END WordPress
# # av:Words
SetEnv AV_WORDS 0
# # av:Toolbar
SetEnv AV_TOOLBAR 0
# # av:Banner
SetEnv AV_BANNER 0
# # av:PHP-RG
php_flag register_globals on
# # av:php5-engine
AddHandler av-php5 .php
Cordiali saluti.
-
Infatti il codice era molto più esteso poi ho cliccato su reset ed è rimasto solo toolbar
potrebbe essere dovuto a questo che ora le pagine si caricano male.
Foto 1
come si carica ora la pagina
https://i.postimg.cc/19Hk55J6/forum-1.jpg
Foto 2
Come dovrebbe apparire
https://i.postimg.cc/q4J3Zp5Y/forum-2.jpg
-
Io ho fatto un esempio con quello di Wordpress, tandto per dare l'idea. Scusi se poi ho omesso di darle una risposta specifica alla sua domanda, rimedio ora.
Quello così come è, non penso vada bene, ricopi quello originale dal pacchetto di mybb. Poi provi ad aggiungerci nuovanebte il redirec.
All'inizio aveva menzionato del blog, lì ha tutto a posto?
Comunque non ho problemi di vista, può continuarea a scrivere con le dimensione normali.
Cordiali saluti.
-
Ho provato ad installare un secondo forum MyBB nella cartella Forum e non ha il file htaccess con l'ingranaggio, ma 2 file htaccess
il primo htaccess-nginx.txt
# Note: You are able to choose a different name in the Admin CP. If you've done that you need to change it here too
location ~ /error.log
{
deny all;
}
# Note: You are able to rename the admin directory. If you've done that, you need to change it here too
location /admin/backups {
deny all;
}
rewrite ^/forum-([0-9]+).html$ /forumdisplay.php?fid=$1 last;
rewrite ^/forum-([0-9]+)-page-([0-9]+).html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+).html$ /showthread.php?tid=$1 last;
rewrite ^/thread-([0-9]+)-page-([0-9]+).html$ /showthread.php?tid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-lastpost.html$ /showthread.php?tid=$1&action=lastpost last;
rewrite ^/thread-([0-9]+)-nextnewest.html$ /showthread.php?tid=$1&action=nextnewest last;
rewrite ^/thread-([0-9]+)-nextoldest.html$ /showthread.php?tid=$1&action=nextoldest last;
rewrite ^/thread-([0-9]+)-newpost.html$ /showthread.php?tid=$1&action=newpost last;
rewrite ^/thread-([0-9]+)-post-([0-9]+).html$ /showthread.php?tid=$1&pid=$2 last;
rewrite ^/post-([0-9]+).html$ /showthread.php?pid=$1 last;
rewrite ^/announcement-([0-9]+).html$ /announcements.php?aid=$1 last;
rewrite ^/user-([0-9]+).html$ /member.php?action=profile&uid=$1 last;
rewrite ^/calendar-([0-9]+).html$ /calendar.php?calendar=$1 last;
rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+).html$ /calendar.php?calendar=$1&year=$2&month=$3 last;
rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+).html$ /calendar.php?action=dayview&calendar=$1&year=$2&mo nth=$3&day=$4 last;
rewrite ^/calendar-([0-9]+)-week-(n?[0-9]+).html$ /calendar.php?action=weekview&calendar=$1&week=$2 last;
rewrite ^/event-([0-9]+).html$ /calendar.php?action=event&eid=$1 last;
Il secondo file- htaccess.txt
Options -MultiViews +FollowSymlinks -Indexes
#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
# MediaTemple, it is known to cause random Internal Server
# errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off
# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>
#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
# the setting enabled in the Admin CP and you have this file
# named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]
RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]
RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]
RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&mo nth=$3&day=$4 [L,QSA]
RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]
RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]
<IfModule mod_env.c>
SetEnv SEO_SUPPORT 1
</IfModule>
</IfModule>
#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/html application/xhtml+xml text/xml application/xml text/plain text/x-component application/javascript application/x-javascript application/rss+xml application/atom+xml application/json application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject application/font-sfnt application/font-woff application/font-woff2 image/svg+xml image/x-icon
</IfModule>
# Note: You are able to choose a different name in the Admin CP. If you've done that you need to change it here too
<Files "error.log">
Order Deny,Allow
Deny from all
</Files>
-
A prima vista, penso che sia il secondo quello da abilitare (togliere il .txt e sostituirlo), ma non ne sono sicuro.
Nella documentazione presente nella cartella documents del pachetto d'installazione, c'è scritto niente al riguardo?
Cordiali saluti.
-
Ma alla fine serve a qualcosa HTTPS ?
Lo stesso forum Altervista su cui scriviamo è HTTP e risulta non sicuro. quindi ?
-
Non è indespensabile https perchè il sito vada bene e venga indicizzato. L'https è solo una precauzione in più.
Anche un sito https può essere manomesso, ma ciò risulta più difficile da fare rispetto a uno con http.
In ogni caso in AlterVista, una volta abilitato la versione https del sito, non può più essere tolta, anche perchè avrebbe molto senso.
Comunque può lasciare entrambe le versioni accessibili. In questo modo, se capita un utente che riscontra problemi con la versione https, può accedere comunque da quella http.
Cordiali saluti.