Fake Subdomain ( htaccess - whm )

Posted December 28, 2016 3.7k views


My english is a little bad

I want to create fake subdomain


Digital Ocean :

another :

I do not want to create a subdomain for each subdomain via cPanel

I want to do this with fake with htaccess

I hope you understand me

Thank you

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

.htaccess can be used to redirect a user to a specific location and this can be based on what subdomain or file path is requested. Is this what you’re looking to do (a redirect)?

For example, this type of .htaccess file can be used to force www

RewriteEngine on
RewriteCond %{HTTP_HOST} ^
RewriteRule ^(.*)$$1 [R=permanent,L]
  • No

    My Server

    Directs any subdomain to / var / www

    I want the subdomain to be redirected to / home / marketvitrini / public_html

    *any subdomain