• Resolved Hybrid

    (@hybrid1969)


    I am trying create a virtual url for my SSO callback plugin and using –

    // SSO callbacks
        function web_sso_callback() {
            global $wp_rewrite;
            $plugin_url = plugins_url( 'authcallback.php', __FILE__ );
            $plugin_url = substr( $plugin_url, strlen( home_url() ) + 1 );
    
            // The pattern is prefixed with '^'
            // The substitution is prefixed with the "home root", at least a '/'
            // This is equivalent to appending it to <code>non_wp_rules</code>
            $wp_rewrite->add_external_rule( 'authcallback.php$', $plugin_url );
        }
    
        // init functions
        function web_init_action(){
            web_sso_callback();
        }
        add_action( 'init', 'web_init_action' );

    However this is not working. authcallback.php sits in the root of the plugin folder. Any hints as to what i am doing wrong.

Viewing 1 replies (of 1 total)
  • Thread Starter Hybrid

    (@hybrid1969)

    closing as obviously need to re-word my question

    Re-posted/re-worded post here –

Viewing 1 replies (of 1 total)
  • The topic ‘Callback URL using $wp_rewrite->add_external_rule() not working’ is closed to new replies.