Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3974156
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:32:06+00:00 2026-05-20T04:32:06+00:00

I am currently developing a jquery function which I intend to use to replace

  • 0

I am currently developing a jquery function which I intend to use to replace url gates -> http://mydomain:20000

As you know SharePoint use a usercontrol to embed the globalnavigation, and when rendered as HTML you find “/Subsite/Folder/Page.aspx” in the anchors tags’ href.

My problem here is that my colleague has managed to develop a cross-site navigation for a costumer, and that costumer also has a MySite which uses this cross-site navigation and MySites usually resides on another gate entry, in my case gate 20000.

So in order for the users to navigate around without getting 403 errors just because the cross-site navigation doesn’t remove the :20000 entry I want to use a jquery script to remove that entry. Only problem – Don’t know how.

A scrapped version:

<script type="text/javascript">
    $(document).ready(function () { 
        var urlContain = new RegExp(':20000');
        $('#s4-topheader2 a').each(function () { 
            var href = this.getAttribute('href').replace(urlContain, '');
            $(this).attr('href', href);
        });
    });
</script>

It works as intended, but unfortunately, it doesn’t remove the :20000 from the domain, as I mentioned earlier, the anchors only seems to contain “/Subsite/Folder/Page.aspx” when rendered. Though when I hover over them, I can see in the bottom left corner of my browser that it contains the domain name, but not when I View source.

Ideas and thoughts to solve this are highly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:32:07+00:00Added an answer on May 20, 2026 at 4:32 am

    If the URL is "/Subsite/Folder/Page.aspx" as you say, then your browser will show the full address in the bottom left (as you say). This is because the URL "Subsite/Folder/Page.aspx" is an address relative to the current domain.

    This means that if that page is accessed from

    http://www.example.com it will show http://www.example.com/Subsite/Folder/Page.aspx

    http://www.example.com:8080 -> http://www.example.com:8080/Subsite/Folder/Page.aspx

    http://www.example.com:2000 -> http://www.example.com:2000/Subsite/Folder/Page.aspx

    etc.

    By the sounds of it your javascript there is irrelevant, because there’s no domain:port in the URL to start with.

    You options are:

    1. Add the domain (without the port) to the URLs. There’s plenty of examples online on how to get just the domain part of the current page. You would then use a modified version of your current javascript to add the new domain (with http://) to the start of each URL.
    2. Change the entry gate that the other site uses so that it uses the correct domain:port. I don’t completely understand your situation here, or your setup. But hopefully this makes enough sense for you to fit it to your needs.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing a webpage where I want to use the ToggleClass function
I'm currently developing a form which will be powered by HTML5 features and jQuery.
I'm currently developing (another) Open Source CMS in PHP and I'd like to use
I'm currently developing a website which stores bookmarks in a MySQL database using PHP
I'm developing in Google App Engine (python sdk) and I want to use jQuery
I am currently developing a site that users the jQuery superfish plugin to construct
I'm developing this app which as a very basic Ajax form and I'm currently
I am currently developing a web-frontend for a web service. I am using jQuery
I am currently developing a mobile site using jQuery mobile. I have one simple
I am developing a mobile web app. Currently I have this snippet of jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.