刚开始以为是 Apache 里面没有开启支持,后来将httpd.conf 里面的都开启了,但是在.htaccess里面写了跳转规则,页面无法跳转,将跳转规则写在 httpd.conf里面却可以正常跳转。下面是 httpd 内容和 htaccess 内容,大家帮我看看哪里出错了,谢谢。
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
。。
LoadModule rewrite_module modules/mod_rewrite.so

DocumentRoot "c:\www"#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
    Options all
    AllowOverride ALL
    Order deny,allow
    Deny from all
</Directory>#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
##
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "c:\www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options all    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride all    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all</Directory>#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
# "C:/Program Files/phpStudy/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/Program Files/phpStudy/Apache2/cgi-bin">
    AllowOverride all
    Options all
    Order allow,deny
    Allow from all
</Directory>#
# DefaultType: the default MIME type the server will use for a document

# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
#RewriteEngine on
#RewriteRule ^/a_(.*).html$ /a.php?id=$1
 在htaccess 文件中也是这两条规则<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>提示帖子太长 没法发布 我就省略了中间的 内容 留下 我改动过的 内容

解决方案 »

  1.   

    你用phpinfo()看看rewrite有没有开启
      

  2.   

    请认真阅读 http://man.chinaunix.net/newsoft/Apache2.2_chinese_manual/howto/htaccess.html
    及相关章节
      

  3.   

    第一部:开启重写模块
    第二部:将相关目录设为可覆盖。<Directory "服务器目录">
      AllowOverride all   #这里all
      Options all
      Order allow,deny
      Allow from all
    </Directory>第三:随便在.htaccess里写点东西看看出不出错
      

  4.   

    mod_rewrite.so 这个文件看是不是真在呀?
      

  5.   

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.提示上面的错误,估计是支持htaccess文件
    文件中只写入下面两句话
    RewriteEngine On
    RewriteRule ^/a_(.*).html$ /a.php?id=$1那么访问 http://localhost/a_124.html 的时候 不就是访问了 http://localhost/a.php?id=124 了么。但是却提示页面不存在?