1

I would like to access my index.php file from any subdomain

example:

anything.mywebsite.com >>> index.php

Is it possible to do that with just a htaccess ?

TheShun
  • 1,128
  • 6
  • 15
  • 21
  • You don't use .htaccess for that. It's solved via your virtual host configuration. If using Apache you just create several ServerAlias entries for the given VHost – sg- Dec 09 '16 at 04:27
  • Here are similar questions http://stackoverflow.com/questions/8730298 http://stackoverflow.com/questions/11388618 – kashesandr Dec 09 '16 at 07:47

1 Answers1

0

You can achieve that in your virtual host configuration. Example for Apache:

<VirtualHost *:80>
    ServerName something.mywebsite.com
    ServerAlias anything.mywebsite.com
    ServerAlias anything-else.mywebsite.com

    ...other VHost settings...
</VirtualHost>
sg-
  • 2,196
  • 1
  • 15
  • 16