By riserjordan
I’m trying to forward one domain that leads to my DO droplet to another domain that also leads to the same droplet. I’ve done this in the past with a simple 301 redirect in an .htaccess file. But after adding this it still isn’t forwarding.
I’ve added the .htaccess file in the /var/www/html folder, should I try adding this further up the dir structure? Or is there a better or more suitable option to doing this?
The end result should take domain-one.com and forward it to domain-two.com instead.
I am running a ubuntu with lamp droplet by the way.
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!
Make sure that you have AllowOverride All in your main Apache configuration for virtual hosts. If you don’t then it completely ignores .htaccess files.
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.