Drupal 6 Clean URL configuration on Windows XP and Apache 2.2(依此实现Clean URL)

   2023-02-09 学习力0
核心提示:http://drupal.org/node/399310 Enter Apache 2.2 conf directory: cd C:\Program Files\Apache Software Foundation\Apache2.2\confOpen httpd.conf notepad httpd.confUncomment loading of read-write module by removing #:LoadModule rewrite_module mo

http://drupal.org/node/399310

 

  1. Enter Apache 2.2 conf directory:

    > cd C:\Program Files\Apache Software Foundation\Apache2.2\conf
  2. Open httpd.conf

    > notepad httpd.conf
  3. Uncomment loading of read-write module by removing #:

    LoadModule rewrite_module modules/mod_rewrite.so
  4. Uncomment including virtual hosts delaration file by removing #:

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf
  5. For declaring only localhost
    1. create or clear contents of file conf/extra/httpd-vhosts.conf
    2. Copy and paste the following in this file:

      <Directory />
          Options FollowSymLinks
          AllowOverride All
          Order deny,allow
          Deny from all
          Satisfy all
      </Directory>

      <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
          Options Indexes FollowSymLinks
          AllowOverride All
          Order allow,deny
          Allow from all

          RewriteEngine on
          RewriteBase /
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
      </Directory>

      # Use name-based virtual hosting.
      NameVirtualHost 127.0.0.1

      <VirtualHost 127.0.0.1>
         DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
         ServerName localhost
         DirectoryIndex index.php
      </VirtualHost>

Jeff in Seattle

Very helpful guide

shaunak - March 13, 2009 - 12:05

Very helpful post.

I would also like to add that you also may have to set the "AllowOverride" directive to "All" [around line 224 in the httpd.conf file] to allow directives in the .htaccess to work.

 

around that line, you can see,

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>

--
Cheers,
shaunak.

 在上述设置完成后,再进行以下两步:

(1)"开始"--"程序"--"Apache HTTP Server 2.2.6"--"Control Apache Server"--"Restart"

 

(2)  打开IE浏览器,pointer to http://127.0.0.1/drupal/

    "Administrater"--"site configure" --"Clean URLs"--选Enable

 
反对 0举报 0 评论 0
 

免责声明:本文仅代表作者个人观点,与乐学笔记(本网)无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
    本网站有部分内容均转载自其它媒体,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责,若因作品内容、知识产权、版权和其他问题,请及时提供相关证明等材料并与我们留言联系,本网站将在规定时间内给予删除等相关处理.

  • Apache80端口被占用解决办法
    Apache80端口被占用解决办法
    1. win+R,输入 cmd,打开命令行窗口2. 命令行输入netstat -ano3. 找到80端口及对应进程 4. 在任务管理器中的进程处查看与上述80端口对应的PID相同的进程,并关闭。如果没有PID,选择“查看”--"选择列"--勾选“PID”。4. 关闭进程。如果进程为上述系统服务,
    03-08
  • Hadoop中mapreduce运行WordCount程序报错Error:
    这个问题是因为map的方法参数与继承mapper定义的参数类型不一致导致的,应该将Mapper的key参数类型设置成Object,就可以解决这个问题 
    03-08
  • 使用 Apache Hudi 实现 SCD-2(渐变维度)
    使用 Apache Hudi 实现 SCD-2(渐变维度)
    数据是当今分析世界的宝贵资产。 在向最终用户提供数据时,跟踪数据在一段时间内的变化非常重要。 渐变维度 (SCD) 是随时间推移存储和管理当前和历史数据的维度。 在 SCD 的类型中,我们将特别关注类型 2(SCD 2),它保留了值的完整历史。 每条记录都包含有
    03-08
  • 一个用 Python 分析 Apache 日志的故事
    一个用 Python 分析 Apache 日志的故事
    介绍不久前,公司里有人告诉我“我想知道 Apache 的访问日志是否可以用来做一些事情”。数据分析,Apache,发文章,我是初学者,写的不好请见谅。访问日志分析导入模块我正在使用以下模块。# データの処理import pandas as pdimport numpy as np# グラフ表示i
    03-08
  • [转]用apache反向代理解决单外网ip对应内网多个
    用apache反向代理解决单外网ip对应内网多个web主机的问题  转载一个有独立外网IP,需内网服务器对外发布的例子,是应用apache虚拟主机的。来源地址:http://www.itshantou.com/Servers/web/06/10/44219.html    几年前开始在学校的服务器上建网站,那时
    02-10
  • Apache service named reported the following
    apache启动失败报错:The Apache service named reported the following error: AH00451: no listening sockets available, shutting down . The Apache service named reported the following error: (OS 10055)由于系统缓冲区空间不足或队列已满,不能执行
    02-10
  • struts布局管理---SiteMesh一个优于Apache Tile
    1. SiteMesh的基本原理       一个请求到服务器后,如果该请求需要sitemesh装饰,服务器先解释被请求的资源,然后根据配置文件 获得用于该请求的装饰器,最后用装饰器装饰被请求资源,将结果一同返回给客户端浏览器。 2. 如何使用SiteMesh    这里以st
    02-10
  • linux 安装 apache2.2.31
     Linux下安装和配置Apache 概要:本文介绍在CentOS5.4 Linux中安装和配置Apache2.2.14,并且实现Apache和Tomcat6的整合。文章分为三部分,分别是删除系统自带的Apache、安装Apache2.2.14和配置Apache2.2.14。 文章中介绍的知识也可以在其它版本的Linux中
    02-10
  • Apache CXF使用Jetty发布WebService
    Apache CXF使用Jetty发布WebService
    一、概述Apache CXF提供了用于方便地构建和开发WebService的可靠基础架构。它允许创建高性能和可扩展的服务,可以部署在Tomcat和基于Spring的轻量级容器中,也可以部署在更高级的服务器上,例如Jboss、WebSphere或WebLogic。 CXF提供了以下功能:WebService
    02-10
  • apache下ab.exe使用方法。。 apache ab工具
    自己在cmd中写了半天的路径也没有写对。。最后网上的一个哥们告诉我说没有共同语言了。。。毛线啊 差距确实很大!大能猫死panda早晚干掉你,叫你丫整天嘲讽我!比如我的ab.exe在D盘的wamp文件夹下apache文件夹下bin文件夹下。那么在cmd中可以这么写:"D:\wamp
    02-10
点击排行