If apache is not installed on your server, it is easy to compile the mod_rewrite module during apache Compilation. the relevant documents can be found at http://man.chinaunix.net/newsoft ...... Ew/mod/mod_rewrite.html. If your apache has been installed, you only want to compile mod_r
If your server apache has not been installed, it is very simple, compile the mod_rewrite module in apache compilation, the relevant documentation can be in the http://man.chinaunix.net/newsoft ...... Ew/mod/mod_rewrite. html. If your apache has been installed and you only want to compile the mod_rewrite.so module and load it in apache, we will introduce this method below.
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.