Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a newbie with Zend framework. How do I run the url of project without the public folder name.I am using a shared hosting server .Anyway to change this by using .htacces ?. I should have the url look like Please advise me

share|improve this question

migrated from Dec 6 '11 at 2:45

This question came from our site for professional and enthusiast programmers.

What does this have to do with Zend? Simple DNS and http daemon configuration solves this for you. – Brad Dec 5 '11 at 5:13
@Brad Can you explain a little bit more ? You mean I need to point the url to the public folder ? – Rinto George Dec 5 '11 at 5:18
How can I? You didn't say what web server you are using, nor DNS. I can't explain anything for you, if you can't explain what software you are using. – Brad Dec 5 '11 at 5:19
@Brad Thanks.I will check this with server people ,they may have help me. FYI ,I am using linux server hosted on znet – Rinto George Dec 5 '11 at 5:26
You're using cPanel. Depending on how this is setup, usually you just go and click "subdomains" and add one. In any case, this is no longer appropriate for Stack Overflow. Voting to migrate it to Please read the FAQ: – Brad Dec 5 '11 at 5:28
up vote 3 down vote accepted

The best solution is to point the site document root to the project's public directory.

If you are using CPanel (as mentioned in the comments), you can simply add the myzfproject sub-domain and enter the directory to the public directory (relative to your home dir) in the Document Root field (ref

Another option is to completely separate the public folder from the rest of the application.

For example, the contents of the public folder can reside anywhere, say /home/user/sites/myzfproject which is set as the site document root.

The application can exist anywhere else, say /home/user/apps/myzfproject with the application and library folders within.

The only change required would be to /home/user/sites/myzfproject/index.php

    || define('APPLICATION_PATH', '/home/user/apps/myzfproject/application'));
share|improve this answer
Thanks Phil for your advise – Rinto George Dec 6 '11 at 4:43
@RintoGeorge: "Thanks Phil for your advise" [sic.] is best expressed "by clicking on the check box outline to the left of the answer.". – Johnsyweb Dec 13 '11 at 9:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.