R
R
random2222019-01-30 11:53:47
htaccess
random222, 2019-01-30 11:53:47

How to merge all subdomains from WWW to non-WWW in .htaccess?

a site on https
is needed, for example, from https://www.moskva.test.ru/ to https://moskva.test.ru/
there are many cities ..
also glue index.php and .html on subdomains... help plz

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
random222, 2019-01-30
@random222

Tried this option - but subdomains don't want to redirect anyway
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^(.*)$ https://%1/$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