Apache configuration for the htaccess file to take effect

Source: Internet
Author: User
Tags zend framework

Apache configuration:

Edit the httpd. conf file

(1) find:
# Loadmodule rewrite_module modules/mod_rewrite.so and remove "#" from the previous line, because this is required to use Zend framework, at least for now.

Add the following lines at the end of the file: (change the path as needed)
ScriptAlias/PHP/"C:/PHP /"
Addtype application/X-httpd-PHP. php
Action application/X-httpd-PHP "/PHP/php-cgi.exe"
In this way, the PhP5 program can run normally.

(2) locate AllowOverride none.
Changed:
AllowOverride all to make the/htaccess file take effect. The Apache configuration is complete.

(3) restart the Apache server and edit index. php as follows:
<? PHP
Phpinfo ();
?>
Put it in the root directory of your website, open your browser, and enter: http: // localhost
Press enter. If the PHP basic configuration information is displayed, the configuration is successful.

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.