Web boffins...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Web boffins...

14 Posts
5 Users
0 Reactions
82 Views
 MTT
Posts: 17
Free Member
Topic starter
 

How do i create a sub-directory within my site like;

www.MainSite.c0m is your main Site
www.Secondarysite.c0m is your Secondary site, linked to

http://secondarysite.MainSite.c0m

Where do I create a directory to put my HTML/CSS/Images so it will show as; http://NewDirectory.MainSite.c0m?

Its for a satellite site. The current standard directory for the main site is Var/www/html/

Thanks


 
Posted : 29/05/2009 12:30 pm
 Aidy
Posts: 2965
Free Member
 

You'll need to configure the webserver/dns in order for it to work the way you want it to.

[Edit] Your webserver might be smart enough to direct to the correct directory if you've got a *.domain.com vhost set, but you'll need to consult the docs/config to find out what the directory structure would be, in this case.


 
Posted : 29/05/2009 12:40 pm
Posts: 31206
Full Member
 

It's called a [url= http://en.wikipedia.org/wiki/Subdomain ]sub-domain[/url] and you do it as part of your DNS configuration.

Your hosting provider [i]may [/i]supply tools that allow you to edit your DNS entry and create new sub-domains without getting [i]too [/i]technical.


 
Posted : 29/05/2009 12:40 pm
Posts: 2
Free Member
 

To clarify, you have to do both these tasks. First configure the webserver to serve the new domain from the new directory (this new directory can be anywhere you want but the webserver will need to be configured to direct the new domain to it.)

Then create the new subdomain entry in your DNS.

The first step will have to be carried out by your ISP assuming you're not hosting your own server.
The second step will either be through ISP supplied tools as Graham points out or by approaching the holder of your root domain name.


 
Posted : 29/05/2009 2:40 pm
 MTT
Posts: 17
Free Member
Topic starter
 

Thanks for the feedback, i am getting mixed messages from the host, on the standard package (mine) I can't use subdomains, it will cost me another £100 for that privilege yet i received this email;

Hi Matt,
You will need to select the 'Domain Parking' option by please note that the
VDS Packages are intended as a Single Primary Domain Solution, they can
however support multiple Virtual Domains by using our Register1.net Domain
Control Panel.

You can host as many of your own personal sites on the VDS as you wish, the
Virtual Sites will not have the same functionality as the VDS site
(Mailservers / FTP Servers names will reflect the VDS site name for example)
however they will show their own SiteName in the Address bar at the top.

Using the Register1 Control Panel for your additional sites, you can simply
redirect them to subdomains on your VDS Pro (Subfolders on a VDS Standard).
Register1's advanced redirection allows for full path URL's to be used.

For example

www.VDSsite.com is your main Site
www.Secondarysite.com is your Secondary site, linked to
http://secondary.vdssite.com

www.Secondarysite.com will work and Display www.Secondarysite.com in your
Browser.
www.Secondarysite.com/holiday/spain/img_033.jpg will work and display

and display
www.Secondarysite.com in your browser.

This will allow you to host multiple sites from one VDS Pro.
Please note, Reselling is NOT permitted from VDS account. Any accounts
found to be used for Commercial reselling will be suspended and may be
removed.

If you require full site functionality you can simply purchase a VDS for
each site (you can click the Upgrade to VDS button at any time to instantly
upgrade)

followed by;

We have added the forwarding package to your account which will allow you
to forward from your new domain to a subdirectory on your VDS website.

I have temporarily forwarded it to the VDS website whilst i figure out what to do next. It looks like i may have to upgrade or take out a new hosting package...

i thought it would be as easy as creating a new directory and forwarding to it.


 
Posted : 29/05/2009 3:46 pm
 MTT
Posts: 17
Free Member
Topic starter
 

ahhhh, i think i have found my way around it. I have created a directory in Var/www/http called 'temp' and forwarded the new domain name to that directory, i have put my html pages in there (no CSS or images yet) and it works. The only difference being that the domain name does not change when you switch pages, for instance;

normally; [i] http://www.MainSite.c0m [/i] becomes [i] http://www.MainSite.c0m/service.html [/i] or [i] http://www.MainSite.c0m/contact.html [/i] depending on the the page you click.

Now; [i] http://www.SecondarySite.c0m [/i] always shows as [i] http://www.SecondarySite.c0m [/i] regardless of the page you use.

Any negatives to this? i am sure i have seen this before.


 
Posted : 29/05/2009 4:52 pm
 MTT
Posts: 17
Free Member
Topic starter
 

another question, because it is a subfolder the host automatically puts on a favicon.ico, regardless of how i write my HTML i can't get rid of theirs!


 
Posted : 29/05/2009 5:47 pm
Posts: 0
Free Member
 

the host automatically puts on a favicon.ico

why not put in one of your own instead ? You could make it transparent so it's invisible...


 
Posted : 29/05/2009 5:50 pm
 MTT
Posts: 17
Free Member
Topic starter
 

I'd like my own favicon, whenever i try to insert one in the conventional way the default host favicon takes it's place. I think this is because the my web page HTML is linked to rather than being the actual page source. But then i don't know what i am talking about...


 
Posted : 29/05/2009 6:07 pm
Posts: 0
Free Member
 

Why not just stick a favicon.ico file in the base directory instead of using the HTML link ?


 
Posted : 29/05/2009 6:17 pm
 MTT
Posts: 17
Free Member
Topic starter
 

I take your point and thanks for you help, the favicon that appears doesn't come from my directory, it comes from theirs! I cannot edit the page source that appears on the website, it simply directs to my directory with it being a satellite site. I think i might have to live with it.


 
Posted : 29/05/2009 6:22 pm
Posts: 2
Free Member
 

[i]I have created a directory in Var/www/http called 'temp' and forwarded the new domain name to that directory[/i]

using html redirects? You can't forward a domain to a directory using DNS unless the web server is appropriately configured to accept that domain name and has it set as using that directory......


 
Posted : 29/05/2009 6:24 pm
 MTT
Posts: 17
Free Member
Topic starter
 

Problem solved.

samuri, it is set up to redirect to a sub-folder.


 
Posted : 29/05/2009 6:27 pm
Posts: 0
Free Member
 

the favicon that appears doesn't come from my directory, it comes from theirs!

but if you have access to the file structure (as it appears from your references to Var/www/html/) you can place a file in the folder ?


 
Posted : 29/05/2009 6:38 pm
 MTT
Posts: 17
Free Member
Topic starter
 

Yes, you are right, but that would only work for the Primary site, where i have access to the structure, the satellite site is simply a folder within the primary file structure and is referenced via the hosts forwarding service. Fortunately they have given me the option to remove their favicon and to select the forwarding method (i have chosen to mask the actual source of the information (the primary site) with a the satellite domain name, so it never changes)

Clear as mud, i am doing my best.


 
Posted : 29/05/2009 6:46 pm