How to install/Add the mod_rewrite module in Apache in Linux
Source: Internet
Author: User
Take the fedora operating system as an example:
1) install Apache for the first time and add the -- enable-Rewrite option during compilation. For example. /Configure -- prefix =/usr/local/apachel -- enable-so -- enable-mod-shared = all -- enable-Rewrite -- enable-Cache
2) added the mod_rewrite module. # Find.-Name mod_rewrite.c // find the mod_rewrite.c file in the Apache source code installation directory
# Cd path/to/mod_rewrite.c // enter the directory containing the mod_rewrite.c File
#/Usr/local/Apache/bin/apxs-C mod_rewrite.c // apxs should specify the absolute path, in the bin directory where you are currently using Apache
#/Usr/local/Apache/bin/apxs-I-a-n mod_rewrite mod_rewrite.la
If there are no errors, compile a mod_rewrite.so file in your Apache modules directory.
Edit the httpd. conf file and confirm that the httpd. conf file contains the loading statement mod_rewrite.so, as shown below:
Loadmodule rewrite_module modules/mod_rewrite.so
At this time, your Apache should have supported rewrite.
Vicos Note: After the configuration is complete, restart the Apache server.
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.