Hi team,
First of all, thanks for the great application! I really appreciate of all yours work.
I wanted to redirect url without www to with www, and I found many posts about it here in this community, but I'm still lost. Could you please help 😢
What I followed was Apache documentation > remapping > canonical Hostnames section.
I changed /etc/apache2/sites-available/000-default.conf
to
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public
ServerName seggs.xyz
ServerAlias
Redirect "/" "https://www.seggs.xyz/"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.seggs.xyz
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:80>
ServerName www.seggs.xyz
</VirtualHost>
and I am still unable to reach out to seggs.xyz.
I have to use www because the domain registrar gave me no other options. :/
I also found out other's config file name is just default.conf but mine starts with 000-, is that an issue? 🤔 or will it be in anytime soon?
Can anyone please give me a hint?
Any input would be greatly appreciated. Thank you for reading!!