I tried several .htaccess codes to redirect the site to a non-www url. But it redirects to the main site every time.
So when I enter
www.domain.com/forums/
, it redirects to domain.com
, not domain.com/forums/
.WordPress is installed in the main folder. When www is entered on any page there, the rest of the url goes to the relevant page without changing. But I couldn't do this in phpBB. Force server URL settings in ACP don't work in this regard.
its .htaccess
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /forums/
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
....