Removal of index.php on the Apache server in Ubnutu environment

Source: Internet
Author: User





1. Configure in Apache to change the allowoverride none inside to allowoverride all
I'm using the Apache2.4.7 version here. In fact, the following red box in the Apache2.4.7 is not, directly added on the line.
In/etc/apache2/sites-enabled/000-default.conf


<directory/var/www/payserver/>
Options FollowSymLinks
AllowOverride All
Order Deny,allow
Deny from all
Allow from all

</Directory>




Note: Be sure to restart the Apache service after you modify it.


2. Executing in the terminal
sudo a2enmod rewrite


3. The htaccess file must be placed in the directory with this file plus:

Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [L]

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Removal of index.php on the Apache server in Ubnutu environment

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.