Hello everyone,
If I was to set my site to redirect any subdomain to the main page in the htaccess file like so:
RewriteCond %{HTTP_HOST} ^(.*).example.com
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/ [P]
Would this mean that if I was to type in elephant.example.com it would redirect and show www.example.com in the address bar or would it stay showing elephant.example.com?
If it's the former, is there a way to make it so it stays displaying elephant.example.com so that I can redirect it to a folder or would it be better to make the index file of the site check the address of the site and use include
to display the necessary page?