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

  • Home
  • SEARCH
  • 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 6577639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:39:45+00:00 2026-05-25T15:39:45+00:00

I have a php web app created with the zend framework. The document root

  • 0

I have a php web app created with the zend framework. The document root is public_html and the hosting provider will not let me change it to the public_html/public subdirectory. That wasn’t a problem as I found the following .htaccess file which allowed my app to work with the following directory layout:

public_html/public
public_html/application
public_html/application/controllers

etc..

RewriteEngine On

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]

RewriteRule ^\.htaccess$ - [F]

RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]

RewriteRule ^public/.*$ /public/index.php [NC,L]

Now I have a new requirement that I need to run another web app from a different subdirectory under public_html for the same domain, lets call it other, i.e. public_html/other

I’ve tried modifying the .htaccess file to redirect any requests containing “other” to the public_html/other subdirectory, but it always results in a 500 system error, for example if I add:

RewriteCond %{REQUEST_URI} !^/other/.*$
RewriteRule ^(.*)$ /other/$1

Everything breaks and all requests result in a 500 system error. Any suggestion on how to craft the rewrite rules to make this happen?

  • 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-25T15:39:46+00:00Added an answer on May 25, 2026 at 3:39 pm
    RewriteRule ^other - [L]
    

    should do it.

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

Sidebar

Related Questions

I have a LAMP (PHP) web app which need to interface with programs on
In my (PHP) web app, I have a part of my site that keeps
I have written a web app in PHP which makes use of Ajax requests
I have created a PHP-script to update a web server that is live inside
As many do I have a config.php file in the root of a web
Hey all, I am setting up a PHP web app that will make use
I have a PHP web application on an intranet that can extract the IP
I have a PHP web application which uses a MySQL database for object tagging,
I've been writing PHP web applications for some time, and have come across very
So I am just starting out developing PHP web applications and have finished setting

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.