Fake Subdomain ( htaccess - whm )

December 28, 2016 2.1k views
Apache PHP DigitalOcean DNS


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

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} ^example.com
RewriteRule ^(.*)$ http://www.example.com/$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

Have another answer? Share your knowledge.