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
preguntada hace 2 años66 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas