Can I use "set default homepage" to solve the problem that the website of the zendframework cannot be accessed when uploaded to the virtual space?

Source: Internet
Author: User
Tags zend framework
Can I use "set default homepage" to solve the problem that the website of the zendframework cannot be accessed when uploaded to the virtual space? As the question.
A php website is built using the zend framework and uploaded to the virtual host of Western Digital.
Because the web Directory of the VM cannot be set as needed, you can only publish all files of the website to the specified web Directory of the VM.
This leads to a problem: for websites using the zend framework, the web Directory can only correspond to the public folder of the website, and other files and folders must be located outside the web directory, that is, the relationship is parallel to the web Directory. The virtual host cannot meet the requirements of the zend framework architecture, so it can only publish all the files of the website to the web directory specified by the virtual host.
Because the index. php file of the main file is located in the public folder instead of the web root directory, when accessing the website, the system prompts that the home page cannot be found or the home page cannot be opened.
The most common solution provided on the internet is to modify the. htaccess file. However, I always thought it was a bit cumbersome. I tried it according to the Internet, but I failed to properly solve my problem.
Later, I found that my host provider has a "set default homepage" function on the VM Management. I changed my homepage from the original default index. php is modified to/public/index. php. after this change, the homepage of my website can be displayed normally now.
I am new to zend framework development and do not know more about the technology. Therefore, I do not know whether the normal access to my website can be solved after such settings, I would like to thank you for your comments or knowledge!


Reply to discussion (solution)

Is this problem complicated? Why are there no heroes?

I have never used zend framework, and I am not planning to use it.
After reading your description, you cannot use it any more.

If your description is correct, there is no merit in this framework. we recommend that you do not use it either.

I have never used zend framework, and I am not planning to use it.
After reading your description, you cannot use it any more.

If your description is correct, there is no merit in this framework. we recommend that you do not use it either.
Although the zend framework is huge and difficult to learn, it is not desirable. In fact, there are not a few large companies that use the zend framework in PHP development projects. Technology cannot be absolutely labeled as superior or inferior. each technology has its own strengths and weaknesses, and it is not uncommon to make up for each other in the industry.
Since I want to learn this framework, I don't want to give up halfway. there are really a lot of CSDN experts, but few of them are willing to pay attention to this pediatric problem, thank you very much for giving me my personal comments on the problem. thank you.
Wait for other insights...

I feel that the layout of the PHP framework is really not active enough. do anyone who understands the framework despise it here? Unfortunately, this section ....
Disappointed, close the post!

This problem also occurs if you want to set the htaccess file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.