如何通过.htaccess 重写来访问生成的静态页面

网站有大量的二级域名,现在想给二级域名的页面静态化,想实现以下效果,

http://test.baidu.com/ha/a.html 生成的静态页在/ha/test/a.html下,

是否能通过 .htaccess 重写来实现访问网址 http://test.baidu.com/ha/a.html 时实际调用的是这个 /ha/test/a.html 路径的文件?

用的是Apache+php+MySQL做的网站。

返契璇
浏览 1240回答 1
1回答

kevin_7

RewriteEngine OnRewriteRule ^(.+)/(.+).html$ $1/test/$2.html
打开App,查看更多内容
随时随地看视频慕课网APP