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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ