Jump to content

Can I use Wildcard DNS to create subdomain for each my user?


Mhari

Recommended Posts

Hi,
 
I just want to automatically create a new subdomain in my domain for users that have registered and redirect it to example his profile (his username as a subdomain ex: username.mydomain.com)
 
I have search tutorials for it and I found to add new A Record that use wildcard for name.
i found in stackoverflow like shown below:

 

CzAe6njjRBO3Deqq_2pb0A.png

Is heliohost support for this?
 
I have setup it as below:
 
this is my A Record
 
uskPU-QvRrOIcUlInU-qbw.png
 
 
and htaccess:

 

JTJgnIV5RPqyl3yhqzx01A.png

 

 

and index file:

 

axjfVHNfQViLkdxpXteRew.png

 

and the result my browser got redirected in this page when I use https:

 

DxqeuhmgQYG59twd4iq-vQ.png

 

and this page when I not use https:

 

WE0JVseCSD_zUInkVEf7Fw.png

 

 

please any solution for this ?

thanks for reading and answering  :)  :)

 

Link to comment
Share on other sites

it might could help. but actually i looking for the alternative of it. 
i mean if user register in my site he will have his own profile page address as a subdomain (like user.masaeng.ga) that not created in the cPanel but as another alias of my domain and i can easily costumize what will be dispayed there (and dynamic data such as users data) and does not require me to get into cpanel (also not fulling up my subdomain list in cpanel).
please do you have any solutions for this case? such as directing in htaccess or whatever  :unsure:
 
any help would be helpful for me 
 

 

Link to comment
Share on other sites

its working when i visit as (whatever).masaeng.ga

 

but i not sure it is working properly because when i write php code there, the code was not run (it is displayed on the source page)

 

p-F5JjBmRNWcj00abJdvPQ.png

 

also on that guide the code in .htaccess file in not available. then how i get it such as masaeng.ga/index.php?u=mhari as mhari.masaeng.ga

 

any solution please

Link to comment
Share on other sites

Hi, 

 

I am found a problem

 

the urls after the domain are ignored

for example main.masaeng.ga/haha/hihi/huhu/hoho.php will still in main.masaeng.ga/index.php

I mean whatever I write after the domain it would be ignored and show me index.php page.

 

I think this problem appear because something wrong in my .htaccess file

 

here is the file :

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !index\.php
RewriteCond %{HTTP_HOST} ^(.+?)\.masaeng\.ga$
RewriteRule .* /index.php?u=%1 [L]

anyone know what the wrong is?

please tell me since I do not really understand the code

thanks in advance  :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...