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 8863021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:52:18+00:00 2026-06-14T15:52:18+00:00

If my address is http://localhost:8000/index, and I run this jquery: $.getJSON(1,function(data) { …..code });

  • 0

If my address is “http://localhost:8000/index”, and I run this jquery:

 $.getJSON("1",function(data)
        {       
            .....code
        });

I get “http://localhost:8000/index/1”. That’s great. But if I do if I wanted it to be :
“http://localhost:8000/1”
What do I do?

  • 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-06-14T15:52:19+00:00Added an answer on June 14, 2026 at 3:52 pm

    Make the url root-relative:

    $.getJSON("/1", function(data)
    {
         .... code
    });
    

    Specifically, note the / at the start of the url. That is what will point it to the root of the current site, in this case: http://localhost:8000/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My data set contains a column named IconUri that contains a full HTTP address
Suppose I have an asmx web service at the following address: http://localhost/BudgetWeb/Service.asmx This web
The REST project works fine, this can be accessed through this address: http://localhost:8525/Device/Login?deviceID=testid&password=a&serialNum=testserial I
I need to put a file at this address: http://localhost:51547/file.txt What folder would I
I have a Flow in MULE like below : <flow name=MetaService> <http:inbound-endpoint address=http://localhost:8000/jcore/meta transformer-refs=HttpParams
I could not understand why after logging in from address: http://localhost/en/accounts/login/?next=/en/test/ I get refirected
I need some help about mod_rewrite, this is my wordpress address: http://localhost/my_v2010/restaurants?m=display_Add base_url: http://localhost/my_v2010/
I want to fetch the address bar contents with '+'sign. http://localhost:8080/WebService/register.jsp?hdEnc=1ijga8ZMQsjlN//74b+D9g== above mentioned address
I have installed kloxo control panel, this is the address http://173.212.227.142:7778/ . Then I
I have a JSP page at an address like this: http://example.com/foo/bar/rawr/something.jsp When I output

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.