Solved

How to configure zend ce for subdomain access?

Posted on 2012-03-20
8
309 Views
Last Modified: 2012-03-25
Dear sir,
How to configure zend server ce version(appache) to support web access via following manner:
"http://webmail.xxxx.com   ==  http://www.xxxx.com/webmail/
"
Please give me detail information on how to do this.

Thanks!
0
Comment
Question by:matiascx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37750316
in apache's configuration file use:

RewriteCond %{REQUEST_URI} !^/webmail/
RewriteRule ^$ /webmail/ [L]
0
 

Author Comment

by:matiascx
ID: 37750713
Sorry, I am a green hand, can you give me more explaination on how to do that and the meaning?

Thanks!
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37751399
you need to find your apache's configuration file, it's usually named apache.conf or httpd.conf
check if the configuration loads the mod_rewrite module, if not add proper directives to load it
in that file you need to find the proper <directory> directive for the root directory
in that <directory scope you place:
  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/webmail/
  RewriteRule ^$ /webmail/ [L]

the meaning is that any request which is not /webmail/ (RewriteCond directive) will be rewritten to /webmail (RewriteRule directive)

i.g. this is not the place to explain completely how apache configuration works, there exist dozend of books and million of websites doing it ;-)
0
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

Author Comment

by:matiascx
ID: 37753033
For following description:

the meaning is that any request which is not /webmail/ (RewriteCond directive) will be rewritten to /webmail (RewriteRule directive)

It seems that it is not right? Maybe should be any request which is webmail.xx.xx will be rewritten to xx.xx/webmail

Is my understanding right?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37754916
> Maybe should be any request which is webmail.xx.xx
is this what your wish/expect, or what you mean what my rule does?
0
 

Author Comment

by:matiascx
ID: 37756373
Just because your explaination is not same with my expect or understanding.
I am not sure whether or not it is your mis-writing or my knowledge is error.
Can you clarify the rewrite rule in more detail explaination?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 37756687
# make a condition for the rewrite:
# check if the URL (which is in the variable %{REQUEST_URI) matches /webmail/ at the beginning (beginning: ^)
# if it does *not* match the condition is true

  RewriteCond %{REQUEST_URI} !^/webmail/

# now, if the condition above was true do the rewrite:
# rewrite an emtpy URL (beginning ^ immediately followed by the end $ ) to /webmail/
# if done, don not continue with rewriterules [L]



  RewriteRule ^$ /webmail/ [L]
0
 

Author Closing Comment

by:matiascx
ID: 37762844
Thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question