[root@66 bin]# pwd
/usr/local/apache/bin
[root@66 bin]# find / -name mod_rewrite.c
/usr/local/httpd-2.2.9/modules/mappers/mod_rewrite.c
[root@66 bin]# ./apxs -i -a -c /usr/local/httpd-2.2.9/modules/mappers/mod_rewrite.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -
略....
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/local/apache/modules/mod_rewrite.so
[activating module `rewrite' in /usr/local/apache/conf/httpd.conf]
[root@66 bin]# ./apachectl restart
如果没有什么错误的话,会在apache/modules目录中编译出一个mod_rewrite.so文件。
并会在自动在httpd.conf中加载,如果没有自动加载,手工修改httpd.conf文件
vi /usr/local/apache/conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so