apache怎么写rewrite将***.com/plus/view.php?aid=1改成***.com/art-1.html
apache怎么写rewrite将***.com/plus/view.php?aid=1改成***.com/art-1.html

在网站根目录下新建一个

.htaccess 文件


内容如下
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule (.*)/art-(\d+).html$ /plus/view.php?aid=$2

</IfModule>


记得要开启 rewrite 模块

上一篇: IBM沃森以大数据分析挺进客户服务领域
下一篇: 关于Apache的access.log文件过大而照成服务器死机问题解决办法