lovebet愛博代维 | Linux群集 | lovebet愛博维护 咨询电话:13146530122

apache 2.2.22 php 5.2.17 rewrite 配置

发布日期:2012-11-19 16
apache 2.2.22 php 5.2.17  rewrite 配置

安装apache 2.2.22 和 5.2.17


修改php 的几处php.ini 配置
upload_max_filesize = 20M
extension_dir = "d:/php/ext"
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_mysqli.dll
date.timezone = PRC
post_max_size = 80M


修改apache 中 httpd.conf
<IfModule mime_module> 中添加
AddType application/x-httpd-php .php
phpIniDir "d:/php"
LoadModule php5_module "d:/php/php5apache2_2.dll"

启用 rewrite 功能
LoadModule Rewrite_module modules/mod_Rewrite.so

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


RewriteEngine On
#RewriteBase /
RewriteRule ([\w]+).html$ /index.php?q=$1

如果想在一个目录中关闭重写
RewriteEngine Off
即可