Title: Different permalink
Last modified: February 28, 2018

---

# Different permalink

 *  [cvanderberg](https://wordpress.org/support/users/cvanderberg/)
 * (@cvanderberg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/different-permalink-2/)
 * I’m trying to implement this plugin, but after WordPress prompts me for my credentials,
   it redirects to
    `/wp/oauth/authorize/`
 * I think it’s because I’m using Roots’ Trellis to maintain my WordPress installation,
   and I login using `/wp/wp-admin/` in stead of the usual `/wp-admin/`, but I think
   this makes it not work. Where can I change the base url to fix this?
    -  This topic was modified 8 years, 3 months ago by [cvanderberg](https://wordpress.org/support/users/cvanderberg/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [cvanderberg](https://wordpress.org/support/users/cvanderberg/)
 * (@cvanderberg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/different-permalink-2/#post-10039475)
 * I found the issue, and I don’t know if its intentional or not.
 * You’re using `site_url` as function to determine the url which needs to be redirected
   to. In most cases this works, but I have a separate folder for my WordPress installation.
 * My suggestion is to change it to `home_url`.
 * List of files with `site_url`:
 *     ```
       oauth2-provider/examples.php:
          39  function custom_login_redirect() {
          40  	if ( ! is_user_logged_in() ) {
          41: 		wp_redirect( site_url() . '/custom-login?redirect_to=' . site_url() . $_SERVER['REQUEST_URI'] );
          42  	}
          43  
   
       oauth2-provider/includes/admin/page-server-options.php:
         270                                     value="<?php echo $current_user->user_firstname; ?>" required/>
         271                              <input type="hidden" name="email" value="<?php echo $current_user->user_email; ?>"/>
         272:                             <input type="hidden" name="website" value="<?php echo site_url(); ?>"/>
         273  
         274                              <input type="submit" class="button button-primary" value="Request more information"/>
   
       oauth2-provider/includes/admin/page-server-status.php:
         107                              <input type="hidden" name="yourname" placeholder="Enter Your Name" value="<?php echo $current_user->user_firstname; ?>" required/>
         108                              <input type="hidden" name="email" value="<?php echo $current_user->user_email; ?>"/>
         109:                             <input type="hidden" name="website" value="<?php echo site_url(); ?>"/>
         110  
         111                              <input type="submit" class="button button-primary" value="Request more information"/>
   
       oauth2-provider/includes/admin/pages/manage-clients.php:
          60                              <input type="hidden" name="yourname" placeholder="Enter Your Name" value="<?php echo $current_user->user_firstname; ?>" required/>
          61                              <input type="hidden" name="email" value="<?php echo $current_user->user_email; ?>"/>
          62:                             <input type="hidden" name="website" value="<?php echo site_url(); ?>"/>
          63  
          64                              <input type="submit" class="button button-primary" value="Request more information"/>
   
       oauth2-provider/includes/filters.php:
         171  	}
         172  	$response_object->data['authentication']['oauth2'] = array(
         173: 		'authorize' => site_url( 'oauth/authorize' ),
         174: 		'token'     => site_url( 'oauth/token' ),
         175: 		'me'        => site_url( 'oauth/me' ),
         176  		'version'   => '2.0',
         177  		'software'  => 'WP OAuth Server'
   
       oauth2-provider/library/class-wo-api.php:
         144  	 */
         145  	if ( ! is_user_logged_in() ) {
         146: 		wp_redirect( wp_login_url( site_url( $_SERVER['REQUEST_URI'] ) ) );
         147  		exit;
         148  	}
         ...
         176  
         177  				wp_logout();
         178: 				wp_redirect( site_url( add_query_arg( array( 'ignore_prompt' => '' ) ) ) );
         179  				exit;
         180  
   
       oauth2-provider/library/templates/grant-request.php:
          22  
          23  	// Safely redirect the user back through the request but without prompt
          24: 	wp_safe_redirect( site_url( add_query_arg( array( 'prompt' => '' ) ) ) );
          25  }
       ```
   
    -  This reply was modified 8 years, 3 months ago by [cvanderberg](https://wordpress.org/support/users/cvanderberg/).
    -  This reply was modified 8 years, 3 months ago by [cvanderberg](https://wordpress.org/support/users/cvanderberg/).
 *  Thread Starter [cvanderberg](https://wordpress.org/support/users/cvanderberg/)
 * (@cvanderberg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/different-permalink-2/#post-10039616)
 * I thought I fixed it, but it still redirects me to the `/wp/oauth/` url.
 *  Plugin Author [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/different-permalink-2/#post-10039887)
 * Hi and sorry for the ate reply. I will have a look today when I get into the 
   office.
 *  Thread Starter [cvanderberg](https://wordpress.org/support/users/cvanderberg/)
 * (@cvanderberg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/different-permalink-2/#post-10047961)
 * Any luck yet?
 *  Thread Starter [cvanderberg](https://wordpress.org/support/users/cvanderberg/)
 * (@cvanderberg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/different-permalink-2/#post-10107919)
 * Do you reckon I have to look for another solution or can you solve this with/
   for me?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Different permalink’ is closed to new replies.

 * ![](https://ps.w.org/oauth2-provider/assets/icon-256x256.gif?rev=2603051)
 * [WP OAuth Server (OAuth Authentication)](https://wordpress.org/plugins/oauth2-provider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oauth2-provider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oauth2-provider/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth2-provider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth2-provider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth2-provider/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [cvanderberg](https://wordpress.org/support/users/cvanderberg/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/different-permalink-2/#post-10107919)
 * Status: not resolved