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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:42:31+00:00 2026-06-11T15:42:31+00:00

I want exampleapp.com/clientapp/ to execute the index.php in /usr/local/apache/htdocs/clientapp . This stackoverflow question outlines

  • 0

I want exampleapp.com/clientapp/ to execute the index.php in /usr/local/apache/htdocs/clientapp.

This stackoverflow question outlines something similar to what I want to do: https://stackoverflow.com/a/8454/173630

I’m having some trouble getting this working. Here’s the start of my VirtualHost setup:

<VirtualHost exampleapp.com:80>

DocumentRoot /home/platform/src/serverapp/public

RewriteEngine On

Alias /clientapp/ "/usr/local/apache/htdocs/clientapp"
<Directory "/usr/local/apache/htdocs/clientapp">
    FallbackResource index.php
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</Directory>

RewriteRule ^/clientapp/(.*)$ /clientapp/$1 [PT]

I’m using Apache 2.2.22. I know this is kind of a confusing setup — the reason I’m doing this is to avoid cross-domain AJAX requests from clientapp to serverapp.

With this configuration I’m not getting any errors, it’s just falling through to the server app.

Update
The problem was that I had a BasicAuth set up on /usr/local/apache/htdocs/clientapp, and the password wasn’t being prompted for when visiting exampleapp.com/clientapp/ and it was just silently failing. I took off the BasicAuth for now, which gets it to work.

  • 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-11T15:42:32+00:00Added an answer on June 11, 2026 at 3:42 pm

    After trying a few things out, it looks like this is just mod_alias being retarded and either blindly mashing together file-path and URI-path or mistaking the file-path (/usr/local/apache/htdocs/clientapp) for a URI-path (not sure how). Either way, you can do one of two things, it looks like.

    1. Add a trailing slash to your file-path:

      Alias /clientapp/ "/usr/local/apache/htdocs/clientapp/"
      
    2. Remove the trailing slash from your URI-path:

      Alias /clientapp "/usr/local/apache/htdocs/clientapp"
      

    Both seems to do the trick, but I would suggest doing the second option, as it would match requests for exampleapp.com/clientapp (no trailing slash), and mod_dir will properly recognize it as a directory and redirect you to exampleapp.com/clientapp/. Whereas if you go with first option, going to exampleapp.com/clientapp would just give you a 404 (or something in the document root ends up handling it).

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

Sidebar

Related Questions

want to rewrite urls like site.com/software to wp-content/themes/dir/software.php and something is not working.. Here's
Want to work with 4-5 devs over internet on PHP projects. Question : Is
Given an app called ExampleApp, I want to find ~/Library/Logs/ExampleApp basically without using hard
Want to verify that my understanding of how this works. Have a C++ Class
Want to just confirm on following. Please verify if this is correct: 1. As
want to drag element to specific div and if not dragged to this div
big explanation (better safe...), question in bold if you don't want to read it
Sorry that this is very much a beginner's question, but yes, I'm only just
Want to know what the stackoverflow community feels about the various free and non-free
I have an action with def new @test_var = 'i want this to show'

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.