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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:47:59+00:00 2026-06-13T12:47:59+00:00

When I go to http://localhost/api/auth/login I get what I expect.. some data that lets

  • 0

When I go to

http://localhost/api/auth/login

I get what I expect.. some data that lets me log in.

However, when I go to

http://myurl.com/api/auth/login

I just get

{
    "error": {
        "code": 404,
        "message": "Not Found"
    }
}

Currently we have 2 people working on this project, and both of us, when we run it from our local machines, have no issues. We’re to the point where we are putting the app on to a hosted server so that we can start testing it outside of our own machines.

The code is identical, and I know this because we use a git repository in which the server is also pulling from.

My machine is a mac, my buddy’s is a windows machine, and our host is a linux box. This shouldn’t really matter, since all of them should work with mod_rewrite, a requirement for Restler 3.

The only other details I can think of is that the server is hosted by HostMonster, running PHP 5.4.7

Any help would be GREATLY appreciated. Do you need more information?

=== Edit:
This is my .htaccess file. Also, the server runs CGI/FastCGI not mod_php

Options -MultiViews
DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^$ index.php [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule mod_php5.c>
    php_flag display_errors Off
</IfModule>

I just googled ‘fastcgi mod_rewrite’ and none of those links helped 😛

  • 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-13T12:48:00+00:00Added an answer on June 13, 2026 at 12:48 pm

    When ever you come across such issue first try without url rewriting

    instead of

    http://myurl.com/api/auth/login
    

    try

    http://myurl.com/api/index.php/auth/login
    

    If it works you will know that the issue is with url rewriting

    Since you are using CGI/FastCGI make sure you have set

    cgi.fix_pathinfo=0
    

    in your php.ini it will make sure that path info is passed to Restler properly so that restler can find the route

    If it does not work with index.php in the url, you can try generating and verifying routes.php as explained below

    routes.php

    Restler looks at all api methods and its doc comments to generate routes accordingly every time we run it on debug mode. When we run it on production mode it captures the information in routes.php and uses it instead of generating routes every time thus improving efficiency.

    You can check for the generated routes by initializing restler in production mode and refresh on every call

    $r = new Restler(true, true); 
    

    and then check the generated routes.php

    If your routes.php contains no routes it will appear as follows

    <?php $o = array();
    
    // ** THIS IS AN AUTO GENERATED FILE. DO NOT EDIT MANUALLY ** 
    return $o;
    

    If this is your case, it means some how autoloader is failing to load the api class, you can confirm it by manually including the API classes

    If it starts to work, please file a bug using github issues stating that the autoloader is failing for your server configuration and give us more detils so that we can reproduce it and fix it.

    If it still does not work, please file a bug using github issues mentioning your server configuration and give us any detail that could help so that we can reproduce it and fix it.

    Thaks to you, we will also write a trouble shooting guide based on above to help the restler community 🙂

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

Sidebar

Related Questions

I do http://localhost/api/test2.php?id=jr-東北本線-荒川橋梁__35.79_139.72 Then I do $data=$_GET['id']; // Zend says that $data is jr-????-????__35.79_139.72
I want to read the requestParams data from the url using HttpServletRequest http://localhost:8080/api/type?name=xyz&age=20 The
I have the following code: token = client.auth_code.get_token(code, :redirect_uri => 'http://localhost:3000') response = token.get('https://api.foursquare.com/v2/users/self/checkins',
I'm trying to make a RESTful API with rails. When I try http://localhost:3000/api/v1/projects.json?token=kS8xi7YzaUDEmbmi9XL6 I
Could someone please tell me why this <%= destroy_password_url @user.password_reset_token %> generates http://localhost:3000/api/destroy_password.4G5EoRVYMUAtiIKqOerKsw routes.rb
I need to call an API with POST arguments, for example: URL = http://localhost/myAPI/
where used on http://localhost:8692/Contacts/Default.aspx Response.Redirect( http://www.google.com ) redirects to http://localhost:8692/Contacts/http%3a%2f%2fwww.google.com The problem just appeared
I'm making the following request through command-line cURL: curl -X POST http://localhost:8000/api/places/ -vvvv -d
The URL http://localhost:8080/api/xml is not showing the jobs I already confitgured. The Job node
Hey i have this talk to do: Use solr api, use this url: http://localhost:8983/solr/select/?q=tree

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.