H
H
Harold2019-08-03 18:00:38
htaccess
Harold, 2019-08-03 18:00:38

How to write a redirect from m.site.com for 1 request?

RewriteRule ^(.*)sitemap.xml$ index.php?rewrite=sitemap.xml [QSA]

The current request handles a call to site.com/sitemap.xml
But how to transfer only 1 request to m.site.com/sitemap.xml to site.com/sitemap.xml ?
I wrote below, right?
RewriteRule (.*) https://m.%{HTTP_HOST}/sitemap.xml  site.com/sitemap.xml[R=301,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-08-03
@turbinikarpus

RewriteCond %{HTTP_HOST} =m.site.com [NC]
RewriteRule ^(sitemap\.xml)$ https://site.com/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question