Redirecting all Lightsail IP urls to domain.

0

I am running a Wordpress instance on Amazon Lightsail. I want any urls a user may try and visit using the IP to redirect to the same url but with the domain. i.e. 18.170.11.59/contact should redirect to moodstudiolondon.com/contact. I have set the domain explicitly in wp-config.php. I have tried rewriting htaccess to redirect away from the IP, this either does not work or breaks the setup completely. What am I doing wrong? I have tried every solution I can find either on here or on the wider web. Nothing so far has worked. Please help! Currently only the main IP is redirecting to the domain because of the wp-config change. If htaccess is the answer have I changed the incorrect config file? My instance is using system packages and is not self-contained however I have already tried editing the htaccess.conf at /opt/bitnami/apache2/conf/vhosts/wordpress-vhost.conf to no avail.

Thanks

Sleaty
asked 2 years ago57 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions