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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠