I need when an specific page is called with a subdomain it redirects to www.
I can give you an example:
nuevoleon.domain.com/empresa/
I need that the correct url for SEO purposes is:
Put this code in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^nuevoleon\.domain\.com$
RewriteRule ^ empresa(/|$) http://www.domain.com%{REQUEST_URI} [L,R=301]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.