RE: www to non www redirection
04-30-2018, 06:21 PM
(This post was last modified: 04-30-2018, 06:30 PM by JSmith.)
Doing
returns this
Since this is a file automatically generated by Sentora, is there a way for me to edit this part:
so that it includes the rules I'd originally placed in .htaccess?
Also, will this edit provide what I'd originally intended to do (www to non www)?
Code:
cat /etc/sentora/configs/apache/httpd-vhosts.conf
returns this
Code:
################################################################
# DOMAIN: subdomain.mysite.com
<virtualhost *:80>
ServerName subdomain.mysite.com
ServerAdmin zadmin@localhost
DocumentRoot "/var/sentora/hostdata/zadmin/public_html/subdomain_mysite_com"
php_subdomain_value open_basedir "/var/sentora/hostdata/zadmin/public_html/subdomain_mysite_com:/var/sentora/temp/"
php_subdomain_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg"
ErrorLog "/var/sentora/logs/domains/zadmin/subdomain.mysite.com-error.log"
CustomLog "/var/sentora/logs/domains/zadmin/subdomain.mysite.com-access.log" combined
CustomLog "/var/sentora/logs/domains/zadmin/subdomain.mysite.com-bandwidth.log" common
<Directory "/var/sentora/hostdata/zadmin/public_html/subdomain_mysite_com">
Options +FollowSymLinks -Indexes
AllowOverride All
Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
# Custom Global Settings (if any exist)
# Custom VH settings (if any exist)
</virtualhost>
# END DOMAIN: subdomain.mysite.com
################################################################
Since this is a file automatically generated by Sentora, is there a way for me to edit this part:
Code:
<Directory "/var/sentora/hostdata/zadmin/public_html/subdomain_mysite_com">
Options +FollowSymLinks -Indexes
AllowOverride All
Require all granted
</Directory>
so that it includes the rules I'd originally placed in .htaccess?
Also, will this edit provide what I'd originally intended to do (www to non www)?