容器技术交流

 找回密码
 立即注册
查看: 5777|回复: 10

rewrite在famp4中支不支持呢

[复制链接]
发表于 2008-6-25 14:44:40 | 显示全部楼层 |阅读模式
rewrite在famp4中支不支持呢
怎么论坛一开静态化就说找不到页面呢
发表于 2008-6-25 23:29:04 | 显示全部楼层
支持
官方网站就用的famp4.0.1
 楼主| 发表于 2008-6-26 10:50:51 | 显示全部楼层
我的那论坛也是DZ6.0的,但是从原win2003+apache的迁移动freebsd+famp4的,后台一开启url静态化时,全都提示找不到网页,不开启就可访问,不知是怎么回事
 楼主| 发表于 2008-6-26 11:50:05 | 显示全部楼层
版主在httpd.conf中找不到LoadModule rewrite_module 这语句,是不是安装famp4 时没有加载呢,当时不是用./install安装的,   会不会因此没加载rewrite的呢
发表于 2008-6-26 15:01:13 | 显示全部楼层
famp4X安装完成后默认就已经支持rewrite
请仔细看官方网站的软件说明。
 楼主| 发表于 2008-6-27 01:12:49 | 显示全部楼层
有个网友叫你为"洞哥"那我也叫你洞哥啦

多谢洞哥答复,我再去找找其它原因
 楼主| 发表于 2008-6-27 02:45:57 | 显示全部楼层
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/usr/local/apache" will be interpreted by the
# server as "/usr/local/apache/logs/foo.log".

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "/usr/local/apache"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule php5_module        modules/libphp5.so
#

[ 本帖最后由 forwd 于 2008-6-27 03:33 编辑 ]
 楼主| 发表于 2008-6-27 02:46:05 | 显示全部楼层
唉,原来apache2.2.x已经内建了rewrite的了,已不用加载LoadModule rewrite_module modules/mod_rewrite.so

由于自己用了虚拟主机,所以需加载


<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
  RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
  RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
  RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
  RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
</IfModule>

在虚拟主机下,真惨,弄了一个夜晚才搞明白,多谢洞哥答复,下次再俾稍稍深入提示

[ 本帖最后由 forwd 于 2008-6-27 03:37 编辑 ]
发表于 2008-6-27 16:34:42 | 显示全部楼层
原帖由 forwd 于 2008-6-27 01:12 发表
有个网友叫你为"洞哥"那我也叫你洞哥啦

多谢洞哥答复,我再去找找其它原因

叫“爱洞”就好,网上的朋友这样叫
有女孩叫我“洞洞”,你是女孩吗?哈哈...
发表于 2008-6-29 21:05:32 | 显示全部楼层
原帖由 爱洞特漏 于 2008-6-27 16:34 发表

叫“爱洞”就好,网上的朋友这样叫
有女孩叫我“洞洞”,你是女孩吗?哈哈...


洞哥太有才了。。。MM叫你洞洞。。。。是不是叫反了??/
发表于 2008-6-30 00:06:07 | 显示全部楼层
原帖由 hotviews 于 2008-6-29 21:05 发表


洞哥太有才了。。。MM叫你洞洞。。。。是不是叫反了??/
还真有女孩那么叫
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2024-4-26 19:11 , Processed in 0.040504 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表