我试图重定向到http://[random-string].domain.com/http://domain.com/folder/[random-string]/简单htaccess的重定向 - 子域文件夹
目前,我有这样的:
RewriteCond %{HTTP_HOST} ^.*\.domain\.com
RewriteRule ^.*$ http://domain.com/folder/$1/ [R=301,L]
目前,它指向http://domain.com/folder//。 ($ 1缺失)我该如何解决这个问题?
嗯,$ 1变量仍然缺少。 (它重定向到http://domain.com/folder//) – Yongho 2010-02-26 15:15:13
好吧,我的错误,请参阅编辑我的回答(RewrtieCond使用%而不是$) – gregseth 2010-02-26 20:21:22
干杯!对我来说工作得很好,1美元是奖金。 – 472084 2012-07-04 09:26:42