Jump to content

Recommended Posts

Posted

Hi,

 

I'm pretty new to subdomains, so please beare with me --->

Currently i've appointed a subdomain to a subfolder in my-domain.com.

Whenever i select the subdomain in my browser (IE), it will go to my subdomain and imidiately translate the URL to www.my-domain.com/subfolder.

 

I would like the URL to show: subdomain.my-domain.com

How do i accomplisch this?

 

René

Posted

Hi and welcome to the forum. :thumbup1:

 

I don´t know why it shows yourtchdomain.com/subfolder when you type subfolder.yourtchdomain.com but if you creates the subdomain first it will automatically create the subfolder.

It might be that the folder was created first and then the domain that makes this error.

Posted

Welcome to the forum René :thumbup1:

Be sure that you did not create the folder first

and use cpanel to create the sub-domain.

You do not do any redirrection, cpanel will do that.

Posted

Thanks for the quick reply guys!

 

I've played around with creating subdomains. Like Don en Thomas said: if I create a subdomain and then do a test it all works fine. First creating the subdir and then a sub-domain doesn't work, as it seems.

 

Again thanks :thumbup1: ,

 

René

Posted

Welcome to the forums! Glad it worked out ok for you.

Posted

Hello,

 

I've got a question about the possibilities of the subdomains.

My website works with php. It's a portal, so several sections on the same website.

Each section has its own design and its own content.

I've got only one index.php, at the root of my site for all the sections.

So the section (design and content) changes depending on a variable in the url (index.php?section=name_of_the_section)

And after that, I use the sessions to preserve the choice of the section.

If there is no variable in the url, there is a default section.

So, there is no problem if somebody comes at the homepage. But if somebody goes directly on another page, with not defining the section in the url but directly the page (index.php?page=the_page)

this page could be only for a section (so it could have to use a specific design). And as nothing is defined, it uses the default design !

To correct this problem, I think the solution is to use subdomains. So I would be able to define the section(with nothing to write in the url ! it would give a nice and simple url).

 

So to keep the definition on all the pages, the subdomain has to always be there. If I use a redirection, the subdomain is changed by the redirected url. If I don't use any redirection, it goes automatically to a subfolder named as the subdomain.

 

I'd like to change this. The best would be to not use any redirection, and the subdomain would have to goes to the file index.php at the root, with defining the variable as "index.php?section=the_name". My question is so, how to change the target of the subdomain, and conserve the subdomain in the url ?

 

Thank you for your answer

 

best regards

 

Patami

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...