Jump to content

sub domains


fooDigi

Recommended Posts

Guest footballkid4
It depends on the way the server is setup. If the subdomain doesn't exist, some servers will just redirect you to the main server...meaning that if you ping it, you will still get a response. Other hosts won't give a response, so you can ping it and tell like that...
Link to comment
Share on other sites

thanks footballkid, i understand, that there is no definitive way of doing this. the server(s) that i work on are unique and require that same unique attention....

but, tending to my nature, i must believe someone has some suggestions or ideas to help me. this is something i must do. and to try and get some elaboration on your comment on unique server setup, surely someone has ideas.

*edit - ahhhhhj, i think im gonna output :()-=={{{
Link to comment
Share on other sites

Well, it depends greatly on your server and what kind of features they disable/enable and how they configure sub-domains. If the sub-domains are simply directed to folders under the root directory then you can simply check to see if under the root directory [b] if (is_dir($subdomain)) echo "Sub-domain exists!"; [/b] or [b] if (!is_dir($subdomain)) echo "Sub-domain not found!"; [/b] depending on how you want it setup. There are a number of ways the server may be configured, but this is just one possible solution.

If they use a 404 error when trying a sub-domain that doesn't exist you may consider checking to see if it returns a 404 error or not.
Link to comment
Share on other sites

Guest footballkid4
Yes, I guess you couldl simple check if the folders exist...but what happens when/if he's not checking his site? Then he doesn't have access to the folders.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.