Default URL


#1

Hey RTcommunity, I’ve searched for an answer to this and can’t find anything. When I initially setup my Wordpress site, I used mysite.com and in Wordpress, I have it set to the www.mysite.com and everything works fine, displays fine.

I have an instagram script that keeps trying to pull from mysite.com which is causing a redirect loop.

<?php if(!empty($_GET['redirect_uri']) && !empty($_GET['code'])) { $glue = strstr($_GET['redirect_uri'], '?') ? '&' : '?'; header('Location: '.($_GET['redirect_uri'].$glue.'code='.$_GET['code'])); } How can I get this script to pull my site with the www attached? Not sure where I can change that site Wordpress is already working fine with the www. setting. Somewhere in the nginx config? Here is the URL it tries to pull by default which ends up just logging me out of admin. https://api.instagram.com/oauth/authorize?client_id=2ead2d4b1018461aa64f410e07d3cd0b&redirect_uri=http://demo.elated-themes.com/instagram-app/instagram-redirect.php?redirect_uri=http%3A%2F%2Fmedasia.org%2Fwp-admin%2Fadmin.php%3Fpage%3Dsearch_and_go_elated_theme_menu_tab_social_page&response_type=code&scope=public_content Thanks.

#2

Hello,

There are two things to mention -

  1. You have two redirect_uri in the url
  2. Please change the script to accept the redirect_uri parameter instead of redirecturi

e.g

use $GET['redirect_uri'] instead of $GET['redirecturi']

Hope, this will help you.

Regards,
Nitin


#3