# Redirects on AWS Lightsail WordPress

AWS Lightsail (Bitnami) doesn’t enable overrides using .htaccess by default and the structure of the Apache config files is, at best, confusing.

The quick and easy solution is to use:

/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf

The most common redirects are WWW to non-WWW and HTTP to HTTPS. So you don’t have to root around the internet for those, here they are. Just throw the rules below at the end of the file above.

## WWW to Non-WWW

An example of this is having www.codingwithcody.com redirect to codingwithcody.com (go ahead and try it out, I use this rule on this site).

RewriteEngine On