如 有www.aaa.com 绑定到目录 aaaaaa目录下面,有子目录 bbbbbb.aaa.com 绑定到目录 bbb
有不有办法 将 bbb.aaa.com/plus.php?id=333 重写到 www.aaa.com/plus.php?id=333
就是说。打开 bbb.aaa.com/plus.php?id=333 是访问 目录aaa下面的 plus.php文件 而 目录bbb 下面没有plus.php文件
类似于效果
RewriteRule bbb.aaa.com/plus.php?id=([0-9]+) $ www.aaa.com/plus.php?id=$1
有不有办法 将 bbb.aaa.com/plus.php?id=333 重写到 www.aaa.com/plus.php?id=333
就是说。打开 bbb.aaa.com/plus.php?id=333 是访问 目录aaa下面的 plus.php文件 而 目录bbb 下面没有plus.php文件
类似于效果
RewriteRule bbb.aaa.com/plus.php?id=([0-9]+) $ www.aaa.com/plus.php?id=$1
1、使用301重定向。这种方法会转发并在浏览器地址栏显示最终的URL
2、使用curl抓取目标URL,并在当前页面中echo出来,同时需要对图片、js、超链接路径做下处理。
3、使用URL rewrite。
我现在使用的是WIN下的URL重写