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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -