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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:45:59+00:00 2026-06-18T17:45:59+00:00

I have a Zend Framework application setup using modules. E.G. I have a stock

  • 0

I have a Zend Framework application setup using modules. E.G. I have a “stock” module and a “transaction” module. I want to have multiple subdomains for these i.e. stock.website.com, transaction.website.com (so the DocumentRoot will be the same directory for each). The issue is, as they are Zend application ‘modules’ I would have to go stock.website.com/stock, or transaction.website.com/transaction.

I’m wondering if there’s a way to use a rewriteCond rule to identify the subdomain, and then treat all URLs loaded on that page as though they are from stock.website.com/stock, but only having stock.website.com in the adress bar?

At the moment, I have the standard htaccess rules for a zend application.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
  • 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-18T17:46:00+00:00Added an answer on June 18, 2026 at 5:46 pm

    I suggest that you could use Zend Route Hostname for your solution as Zend will route the requests (not htaccess) to specific modules based on hostname, so you stresses on query string url would be not an issue then.

    Basically, you can add to your application.ini like below (for modules only):

    resources.router.routes.stock.type = "Zend_Controller_Router_Route_Hostname"
    resources.router.routes.stock.route = "stock.yourwebsite.com"
    resources.router.routes.stock.defaults.module = "stock"
    
    resources.router.routes.transaction.type = "Zend_Controller_Router_Route_Hostname"
    resources.router.routes.transaction.route = "transaction.yourwebsite.com"
    resources.router.routes.transaction.defaults.module = "transaction"
    

    Then the rest just let Zend handle it.

    Hope this would help you!

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

Sidebar

Related Questions

I have a Zend Framework application with modules and I want to setup PHPUnit
My setup: Ubuntu LAMP, application built w/ zend framework My Problem: I have a
I have a PHP MVC application using Zend Framework. As presented in the quickstart,
I'm building a web application using PHP5.3 and Zend Framework 1.9.4. i have an
All, I have a PHP Web application built using Zend Framework and MVC with
I have a Zend Framework application based on the quick-start setup. I've gotten the
I'm building a multi-site Zend Framework application using modules, sort of in the following
I have been building a dynamic form in my Zend Framework application using Jquery
I have a CMS application written using the Zend Framework that allows you to
I have an application developed in Zend Framework 1.11. I use Zend_OpenId to create

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.