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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:57:01+00:00 2026-06-05T19:57:01+00:00

I am deploying a zend project myproject from a local host to a sub-directory

  • 0

I am deploying a zend project myproject from a local host to a sub-directory http://www.subdirectory.com/~username/myproject, i am facing many problems even though i have read that there is no so much to change to when deploying zend project from local host to sub directory i have tried this which i took from an answer but it didn’t work.

The problem is when I put the link above a file tree with the directory of the project opens, and when I click on public it redirect me to the index page of the default module. and I cant go to any other page

I have no control on the apache2 server. is there a way to deploy the project and this is my code below for the .htaccess,index.php, and application.ini any answers or guidance will be helpful

.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

index.php

// Define path to application directory
defined('APPLICATION_PATH')
        || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define path to application directory
defined('PUBLIC_PATH')
        || define('PUBLIC_PATH', realpath(dirname(__FILE__)));


// Define application environment
defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));


$paths = array(realpath(dirname(_FILE_) . '/../library'), '.');
set_include_path(implode(PATH_SEPARATOR, $paths));
/* Define the base URL */
define('URL_ADDRESS', "http://" . $_SERVER['HTTP_HOST']);


/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
                APPLICATION_ENV,
                APPLICATION_PATH . '/configs/application.ini'
);

$application->bootstrap()
        ->run();

Application.ini

[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1    
includePaths.library = APPLICATION_PATH "/../library"
appnamespace = "Application"
resources.frontController.params.displayExceptions = 1
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.view[] =
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = ""
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.layout.layout = default    
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =    
autoloaderNamespaces.Hyderlib = "Hyderlib_"
resources.layout.pluginClass= "Hyderlib_Controller_Plugin_ModuleLayout"
resources.view[] = 

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1


resources.db.adapter = "pdo_mysql"
resources.db.params.host = "password"
resources.db.params.username = "password"
resources.db.params.password = "password"
resources.db.params.dbname = "password"
resources.db.isDefaultTableAdapter = true
  • 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-05T19:57:04+00:00Added an answer on June 5, 2026 at 7:57 pm

    Take a look at this: .htaccess RewriteRule not working in subdirectory

    I suspect you have to edit the .htaccess to forward requests other than image/css/js through index.php which is not located in the same directory.

    If the webserver root is ~/username/ then put .htaccess in there and change

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

    to

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

    More changes may need to be made to handle the static content (other rewrites).

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

Sidebar

Related Questions

Problem deploying my jaudiotagger project since java.net moved from CollabNet to Project Kenai I
Deploying a Web Application Project from VS2010 RTM causes an error in MSBuild. It
Im deploying my website onto my new server (windows 2003) from my local pc
When deploying a web project written in ASP.Net, what happens to user sessions? Do
While deploying a GAE application, I get errors like: Uncaught exception from servlet javax.servlet.UnavailableException:
I'm deploying sample Zend apps on Zend server, following official tutorials. No matter what
I'm using Zend Framework 1.62 (becuase we are deploying the finished product to a
After deploying a new version of a website the browser loads everything from its
In this question - Deploying a CodeRush plugin from the Community Site - I
While deploying a mavenized application consisting of a parent project, ejb jar project and

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.