destoon采集论坛

 找回密码
 立即注册
查看: 170|回复: 3

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

[复制链接]

85

主题

72

回帖

421

积分

中级会员

Rank: 3Rank: 3

积分
421
发表于 2013-10-29 19:59:35 | 显示全部楼层 |阅读模式
【求救】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-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4
RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4
RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3
RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3
RewriteRule ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$3&page=$4
RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3
RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ $1/index.php?homepage=$2&file=$3&rewrite=$4
RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)([/])?$ $1/index.php?homepage=$2&file=$3
RewriteRule ^(.*)/com/([a-z0-9_\-]+)([/])?$ $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.
回复

使用道具 举报

83

主题

377

回帖

1239

积分

金牌会员

Rank: 6Rank: 6

积分
1239
发表于 2013-10-30 08:55:18 | 显示全部楼层

重新启动apache服务器呢?
回复 支持 反对

使用道具 举报

85

主题

72

回帖

421

积分

中级会员

Rank: 3Rank: 3

积分
421
 楼主| 发表于 2013-10-31 20:04:47 | 显示全部楼层


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

重新启动apache服务器呢?

重启多次都没有,规则有问题
回复 支持 反对

使用道具 举报

85

主题

72

回帖

421

积分

中级会员

Rank: 3Rank: 3

积分
421
 楼主| 发表于 2013-10-30 08:55:00 | 显示全部楼层

求详细方法
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|destoon采集论坛

GMT+8, 2025-11-23 08:51 , Processed in 0.013564 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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