malevolence Posted July 22, 2005 Share Posted July 22, 2005 I'm looking for a way to point a subdomain at my root public_html directory but still keep the subdomain in the url. For example: I want mobile.**** to pull it's content from www.****. A redirect doesn't work because it changes the url. Any ideas? Quote Link to comment Share on other sites More sharing options...
abinidi Posted July 22, 2005 Share Posted July 22, 2005 Probably you will need to modify the .htaccess file, but as I have never done that, I'll leave it for a more experienced family member. Good luck. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted July 22, 2005 Share Posted July 22, 2005 Welcome to the forum malevolence Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted July 22, 2005 Share Posted July 22, 2005 Welcome to the forum, malevolence. Quote Link to comment Share on other sites More sharing options...
TCH-Rob Posted July 22, 2005 Share Posted July 22, 2005 Welcome to the forums malevolence Quote Link to comment Share on other sites More sharing options...
Patami Posted August 7, 2005 Share Posted August 7, 2005 (edited) Hi, Does nobody know the answer to the question ? thank you ahead Patami Edited August 7, 2005 by Patami Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted August 7, 2005 Share Posted August 7, 2005 Sorry Patami, but there doesn´t seems to be someone knowing the answer. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted August 7, 2005 Share Posted August 7, 2005 The only thing I can see is a frame set The top frame set to 1 line to retain the url and the rest to * with the main content in the second frame. Quote Link to comment Share on other sites More sharing options...
Patami Posted August 10, 2005 Share Posted August 10, 2005 hi thank you for your answer, it's a solution, but the frames are not to the w3c standards, and I have to respect these norms .. I asked to your technical support, and they said me I could use the url rewriting .. What do you think about this proposition ? Quote Link to comment Share on other sites More sharing options...
TCH-Andy Posted August 10, 2005 Share Posted August 10, 2005 Hi, If I understand you correctly, that you just want to host the sub.domain.com rather than domain.com - then simply get us to change the domain name associated with yout account to sub.domain.com. Either that, or I have completely missed what you want to do Quote Link to comment Share on other sites More sharing options...
Patami Posted August 11, 2005 Share Posted August 11, 2005 hello no I don't want that ! My website is a portal, I have several sections. I want Each section is asssociated with a subdomain. For a technical reason, I use only one index(.php) for all the sections. To define which section this index has to show, I use a variable in the url (index.php?section=example). To conserve the value of this variable, I'd like to use the subdomains, it would be better. So, each subdomain has to point at a url, composed by of course the index.php of the root, and the definition of the variable : For the example, the section "ogame" has to point at "index.php?section=ogame" I can't use any simple redirection as after the redirection, I obtain the redirected url in my url, and no more the subdomain (so the variable is not defined any more) I hope you'll understand me thank you ahead Patami Quote Link to comment Share on other sites More sharing options...
guita01 Posted August 11, 2005 Share Posted August 11, 2005 I too am interested in how to do this. I have a subdomain gas.guitarforum.net that gets switched to guitarforum.net/gas automatically. This can cause problems with cookies. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted August 11, 2005 Share Posted August 11, 2005 If your subdomain is switching in the address bar then you didn't set up the subdomain correctly. When you create a subdomain it creates the folder for you. If you created the folder and then added a subdomain and told it to use the folder you created this is what happens. Rename your "gas" folder something else in File Manager. Delete the subdomain you created. Then create the subdomain over again using "gas" for the sub name. It will create a new "gas" folder. Now delete the new folder and rename your original floder back to "gas". Quote Link to comment Share on other sites More sharing options...
Patami Posted August 13, 2005 Share Posted August 13, 2005 tell me, by default, a subdomain has for target a subfolder with the same name. Where is this property defined ? Is it on the configurations files of the server, or Can I change it ? Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted August 13, 2005 Share Posted August 13, 2005 Unless I misundestand the question. You can change it by setting up a redirect to in the subdomain management section of cPanel. Quote Link to comment Share on other sites More sharing options...
Patami Posted August 14, 2005 Share Posted August 14, 2005 yes, but I want to keep the subdomain in the url .. how can I work ? Quote Link to comment Share on other sites More sharing options...
TCH-Andy Posted August 14, 2005 Share Posted August 14, 2005 Can I ask why you want the subdomain name and folder name to be different? Understanding your problem, may help us to find the solution for you. Quote Link to comment Share on other sites More sharing options...
Patami Posted August 14, 2005 Share Posted August 14, 2005 of course you can I use only one index.php (at the root of my ftp). You know that with PHP, a page can change according to a variable (in the url in my case). It's very easier for me to manage a website with several sections who has only one index.php ! So, to choose the section that the index.php has to show, I have to define the variable "section" in the url example : index.php?section=my_section For this, there is no problem. Once it's defined by the url, I save the name of the section in a session variable, to keep the choice. If the member of my website comes at the homepage, selects the section and defines it, ok there is no problem. But if he adds a page in his favorites, and if he comes later on the same page. For his first visit, he had defined the section in the url, and this definition had been saved with the sessions. But when he adds the page in his favorites, the session variable is not saved. So, when he comes back later, as the session variable is lost, the section is not defined, and the index.php doesn't show the good page ! To correct the problem, I think I can use the subdomains. So the section is always defined in the url Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.