标签: url for-loop rewrite rule
如何为该网址创建重写规则,如
http://www.abc.in/subfoldername/index.php?alist&TP=xyz&ct=bcd
到
http://bcd.abc.in
答案 0 :(得分:0)
将以下代码输入 .htaccess :
RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9_-]+)\.(.+)$ RewriteRule ^$ http://%{HTTP_HOST}/subfoldername/index.php?alist&TP=xyz&ct=%2 [L]