: Zendframework fails at the address http: // 127.0.0.1/zf/index.

Source: Internet
Author: User
For help: why can't zendframework succeed at http: // 127.0.0.1/zf/index? I started to learn about zendframework today. according to my article on the Internet, after installing zendframework, I tried to apply it, but I found this problem: & nbsp for help: zend framework at the address: http: // 127.0.0.1/zf/index. why cannot this problem be solved?
I started to learn about zend framework today. after installing zend framework according to my article on the Internet,
When I tried to use it, I found this problem:
Input address: http: // 127.0.0.1/zf. (zf is the working directory of zend framework, and the application and library folders are all in this directory ).
However, if you enter http: // 127.0.0.1/zf/index, http: // 127.0.0.1/zf/index, none of them can be executed. why ?? Expert help.


It is also said that the address "http: // 127.0.0.1/zf/test/view" is "controller" and "view" is "action". if you enter this address, then, the zend framework will find the file TestController from application \ controllers. php (it is not clear whether the file name must be like this) class TestController, and then execute the method under this class: testAction ().
Why does zend framework regard test as a controller and view as an action? If I want to execute index. php under/test/view, isn't it possible to execute index. php? Too messy. thank you for your advice.

------ Solution --------------------
Do not consider url rewriting and other factors.

Http: // 127.0.0.1/zf is equivalent to http: // 127.0.0.1/zf/index. php by default.

Http: // 127.0.0.1/zf/index is equivalent to http: // 127.0.0.1/zf/index. php


Of course, the default homepage can be specified at will.


------ Solution --------------------
You google to check urlrewrite url rewriting technology

Maybe it's what you're looking.
------ Solution --------------------
RewriteRule. * index. php

Where is the. htaccess file?

This rule maps. htaccess to all connections in the directory, which is indicated by index. php.

For example
Web root directory/info /......
. Htaccess is in the info Directory

So http: // localhost/info/DDDD/I/n/d/e/x ......
Http: // localhost/info/123123123

All are mapped to http: // localhost/info/index. php
------ Solution --------------------
Blocked other rules first

RewriteRule ^ index \. html $ index \. php [L]

Check that the zf directory contains index. php.

Access

Http: // 127.0.0.1/zf/index.html = "The result is the content of index. php.

If this does not take effect, the rewrite engine is not started.
------ Solution --------------------
Your rewriting rules should consider the rules of all file names in the same directory.
------ Solution --------------------
Note: Three AllowOverride replace None in httpd. conf with AllowOverride All. you may have modified only one
Related Article

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.