apacherewrite:Linux下Apache安装/增加mod_rewrite模块来源: 发布时间:星期日, 2009年1月4日 浏览:6次 评论:0
如果你服务器思路方法
以Fedora操作系统进行举例: 1)首次安装apache在编译时增加——enable-rewrite选项 如/configure ——prefix=/usr/local/apachel ——enable-so ——enable-mods-shared=all ——enable-rewrite ——enable-cache 2)增加mod_rewrite模块 # find . -name mod_rewrite.c //在apache源码安装目录中寻找mod_rewrite.c文件 # cd PATH/to/mod_rewrite.c //进入包含mod_rewrite.c文件目录 # /usr/local/apache/bin/apxs -c mod_rewrite.c //apxs应指定绝对路径在你当前正在使用apachebin目录里 # /usr/local/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.la 如果没有什么话应该在你apachemodules目录中编译出个mod_rewrite.so文件 编辑httpd.conf文件确认httpd.conf中已经包含mod_rewrite.so加载语句如下: LoadModule rewrite_module modules/mod_rewrite.so 这时你apache应该已经支持rewrite了 vicos注:完成的后记得重启服务器apache. 0
相关文章
读者评论发表评论 |
|