1.新建文件1.htaccess,改用户名为.htaccess
2.取消mod_rewrite的注释
3.在httpd.conf中
修改
options Indexes followsymlinks
AllowOverride all
4.写入规则
rewriteengine on
rewritebase /test
rewriterule ^index/.html$ 1.html
如果需要重定向到某页面可用
rewriterule ^index/.html$ 1.html [R=301]
2.取消mod_rewrite的注释
3.在httpd.conf中
修改
options Indexes followsymlinks
AllowOverride all
4.写入规则
rewriteengine on
rewritebase /test
rewriterule ^index/.html$ 1.html
如果需要重定向到某页面可用
rewriterule ^index/.html$ 1.html [R=301]