regex - How to do this rewrite rule for apache htaccess? -
i make rewrite take get.domain.com domain.com/get.php alongside parameters.
example: get.domain.com?v=64 change domain.com/get.php?v=64
also, if possible, request url on webpage not change, , remain get.domain.com?v=64 user.
my current attempt:
rewritecond %{http_host} ^(www\.)?get\.domain\.com$ [nc] rewriterule ^ http://domain.com/get.php [ne,r=301,l]
it translate get.domain.com domain.com/get.php paramters not transferred , url changing.
any idea how that?
you can use rule:
rewritecond %{http_host} ^(?:www\.)?(get)\.domain\.com$ [nc] rewriterule ^/?$ %1.php [l]
Comments
Post a Comment