//windows
a.打开LoadModule rewrite_module modules/mod_rewrite.so
b.
#
# 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
c.制定规则
RewriteEngine On
RewriteBase /
#rules for report
RewriteRule ^article.php_([0-9]*).html$ /ecshop/article.php?id=$1 [L]
d.访问
http://127.0.0.1/ecshop/article.php_794.html
//linux
a. 查看phpinfo.php Loaded Modules 里面必须有 mod_rewrite,没有重新编译apache
b.修改httpd.conf
#
# 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
c.制定规则
RewriteEngine On
RewriteBase /
#rules for report
RewriteRule ^article.php_([0-9]*).html$ /ecshop/article.php?id=$1 [L]
d.访问
http://beta.ecshop.com/mall/article.php_794.html