On linux, how does one install the rewrite module on apache? The answer found on the Internet is: generate a mod_rewrite.so file in the apache installation package successfully & nbsp; Question: I don't know where to find the apache installation package on this server (new to linux) & nbsp; can I directly upload my local mod_rewrite.so? ------ Solution -- how does one install the rewrite module for apache on linux?
The answer on the Internet is: a mod_rewrite.so file is generated in the apache installation package and the experiment is successful.
Problem:
I don't know where to find the apache installation package on this server (new to linux)
Can I directly upload my local mod_rewrite.so?
------ Solution --------------------
Check your apache version, go to the next source code package, and compile it. your local version may not work. Of course, you can read it by yourself,
Or simply re-compile the next new version, and add the rewrite module enable-rewrite during compilation. what linux are you using? Rh?
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.