Fake Subdomain ( htaccess - whm )


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


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

.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]