Hosted WordPress Site in a Subdirectory different server
<p>We are hosting our blog in a subdirectory (<a href="https://domain.com/blog/" rel="nofollow">https://domain.com/blog/</a>), not a subdomain (<a href="https://blog.domain.com" rel="nofollow">https://blog.domain.com</a>). We are fetching content behind reverse proxy from server b.</p>

<p>Every thing is working fine but I could not make Ajax call.<br>
This is my jquery code.<br>
I tried:</p>

<pre><code>if(window.location.href.indexOf('reallygoodstuff.com/community') !== -1) {
    proxied-ajaxurl = '/community/wp-admin/admin-ajax.php';
    proxied-rgsajaxcall ='/community/wp-content/themes/themefolder/js/ajax-auth.js'
    var proxied-url= proxied-rgsajaxcall.proxied-ajaxurl;
}

jQuery(document).on('click', '#seemorefarvt', function(event) {
    event.preventDefault();
    /* Act on the event */

    jQuery(this).remove();
    jQuery("#hideonseemorefavt").delay(800).hide(0);
    jQuery.ajax({

        url: proxied-url,

        type: 'post',
        data: {
            action: 'rgsmainjsfile' ,
            query_vars: rgsajaxcall.query_vars,
        },
        beforeSend: function(){
            jQuery("#showmessage").html('&lt;i class="fa fa-spinner fa-pulse fa-3x fa-fw"&gt;&lt;/i&gt;');
        },
        success: function  (html) {
            jQuery("#appendfavthtml").append(html).show("slow");
            jQuery("#showmessage").remove();
        },

    });
</code></pre>

<p>I get same page which i am on. </p>

<p>Any help will be really appreciated. </p>