Similar thread (ZPanel)
I'm having problems redirecting two of my subdomains from www to non www. I've setup CNAME entries, and created .htaccess with the following content:
and placed them in proper subdomain directories.
However, whenever I type www.mysubdomain.mysite.com, I'm redirected to Sentora login page. I'm guessing that something takes precedence over the rules I've setup, but I'm unsure how to fix it.
I was thinking of making changes in httpd-vhosts.conf, through Sentora admin panel, and setting the redirections there, but I'm unsure whether that would solve my problems.
This redirection is needed, because I have users who keep typing (or calling it from their bookmarks) the www prefix.
Server info:
I'm having problems redirecting two of my subdomains from www to non www. I've setup CNAME entries, and created .htaccess with the following content:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.*) [NC]
RewriteRule ^(.*) http://%1/$1 [R=301,L]
and placed them in proper subdomain directories.
However, whenever I type www.mysubdomain.mysite.com, I'm redirected to Sentora login page. I'm guessing that something takes precedence over the rules I've setup, but I'm unsure how to fix it.
I was thinking of making changes in httpd-vhosts.conf, through Sentora admin panel, and setting the redirections there, but I'm unsure whether that would solve my problems.
This redirection is needed, because I have users who keep typing (or calling it from their bookmarks) the www prefix.
Server info:
Code:
Dedicated server
Server OS: CentOS Linux release 7.4.1708 (Core)
Apache Version: 2.4.6
PHP Version: 5.6.35
MySQL Version: 10.2.14-MariaDB
Sentora Version: 1.0.3