I have co.in domain and this added in digital ocean DNS and also virtual hosts configured as below
<VirtualHost *:80> ServerAdmin webmaster@example.co.in ServerName example.co.in ServerAlias www.example.co.in
But non www is not redirecting to www domain.co.in.please let me know why this is not working. but www version is working perfectly.
my .htaccess file also given below
<IfModule mod_rewrite.c> RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} !^www..+$ [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </IfModule>
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I have a Wordpress installation. <br>How can I configure the AllowOverride parameter?
Run <pre>sudo nano $(ls -1d /tmp/aioefjaisjf/* | grep -v default)</pre> and set AllowOverride to All.
Add <code>RewriteEngine On</code> at the top of your .htaccess file and run this command as root: <br> <br><pre>a2enmod rewrite</pre> <br> <br>Make sure you have <code>AllowOverride All</code> in your Virtualhost config. <br> <br>Finally, restart apache: <br><pre>sudo service apache2 restart</pre>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.