{"id":2128,"date":"2021-12-29T09:44:46","date_gmt":"2021-12-29T08:44:46","guid":{"rendered":"https:\/\/blog.kodono.info\/wordpress\/?p=2128"},"modified":"2021-12-29T09:44:46","modified_gmt":"2021-12-29T08:44:46","slug":"redirect-non-www-to-www-on-a-phpbb-forum","status":"publish","type":"post","link":"https:\/\/blog.kodono.info\/wordpress\/2021\/12\/29\/redirect-non-www-to-www-on-a-phpbb-forum\/","title":{"rendered":"Redirect non-www to www on a PHPBB Forum"},"content":{"rendered":"<p>In the PHPBB directory, edit the file <code>.htaccess<\/code> and after <code>RewriteRule ^(.*)$ app.php [QSA,L]<\/code> you can enter:<\/p>\n<pre>\r\nRewriteCond %{HTTPS} off\r\n# First rewrite to HTTPS:\r\n# Don't put www. here. If it is already there it will be included, if not\r\n# the subsequent rule will catch it.\r\nRewriteRule .* https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\r\n# Now, rewrite any request to the wrong domain to use www.\r\nRewriteCond %{HTTP_HOST} !^www\\.\r\nRewriteRule .* https:\/\/www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In the PHPBB directory, edit the file .htaccess and after RewriteRule ^(.*)$ app.php [QSA,L] you can enter: RewriteCond %{HTTPS} off # First rewrite to HTTPS: # Don&#8217;t put www. here. If it is already there it will be included, if not # the subsequent rule will catch it. RewriteRule .* https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Now, rewrite [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","hide_page_title":"","footnotes":""},"categories":[15,170],"tags":[153,123],"class_list":["post-2128","post","type-post","status-publish","format-standard","hentry","category-astuce","category-english","tag-astuce","tag-english"],"_links":{"self":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/comments?post=2128"}],"version-history":[{"count":1,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2128\/revisions"}],"predecessor-version":[{"id":2129,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2128\/revisions\/2129"}],"wp:attachment":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/media?parent=2128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/categories?post=2128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/tags?post=2128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}