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
已提問 2 年前檢視次數 66 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南