更新时间:2022-02-14 22:44:01
我的 THINK 的这个会做你想让它是什么:
I THINK this will do what you want it to:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*?)/(.*?)$ http://$1.mydomain.com/$2
由于这代表它会重定向进入到子文件夹每个请求,所以如果你链接的图像或CSS,这是在一个子文件夹,它也将重写这些,如果你想列出你可以使用这个只有某些事情p>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(blog|store|other)/(.*?)$ http://$1.mydomain.com/$2
这只会重定向mydomain.com/blog/ mydomain.com/store/和mydomain.com/other /
This will only redirect mydomain.com/blog/ mydomain.com/store/ and mydomain.com/other/