guotao 发表于 2013-10-29 19:59:35

【求救】Apache2.x 伪静态设置方法

【求救】Apache2.x 伪静态设置方法,按官方方法设置了就是不起效,不知为何?
1、LoadModule rewrite_module   modules/mod_rewrite.so,已删除#
2、conf/extra/httpd-vhosts.conf,已加入配置规则
# Destoon B2B Rewrite Rules
ErrorDocument 404 /404.php
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php
RewriteRule ^(.*)/file/(.*)\.php(.*)$ /404.php
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/show-(+)([\-])?(+)?\.html$ $1/show.php?itemid=$2&page=$4
RewriteRule ^(.*)/list-(+)([\-])?(+)?\.html$ $1/list.php?catid=$2&page=$4
RewriteRule ^(.*)/show/(+)/(+)?([/])?$ $1/show.php?itemid=$2&page=$3
RewriteRule ^(.*)/list/(+)/(+)?([/])?$ $1/list.php?catid=$2&page=$3
RewriteRule ^(.*)/(+)-c(+)-(+)\.html$ $1/list.php?catid=$3&page=$4
RewriteRule ^(.*)/(+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3
RewriteRule ^(.*)/com/(+)/(+)/(.*)\.html$ $1/index.php?homepage=$2&file=$3&rewrite=$4
RewriteRule ^(.*)/com/(+)/(+)([/])?$ $1/index.php?homepage=$2&file=$3
RewriteRule ^(.*)/com/(+)([/])?$ $1/index.php?homepage=$2

3、Apache2.2 启动、后台开启URL Rewrite(伪静态),还是无效,测试页面 index-htm-url-rule.html 提示错误

Not Found
The requested URL /index-htm-url-rule.html was not found on this server.

foxcvs 发表于 2013-10-30 08:55:18


重新启动apache服务器呢?

guotao 发表于 2013-10-31 20:04:47



foxcvs 发表于 2013-10-30 08:55

重新启动apache服务器呢?
重启多次都没有,规则有问题

guotao 发表于 2013-10-30 08:55:00


求详细方法
页: [1]
查看完整版本: 【求救】Apache2.x 伪静态设置方法