Map subdomain to url..

BlackMuddler

Active member
Maybe I ask the question wrong - but here what I want.

On my site I now have some 'big' add-ons installed. They all have url:

domain.net/forum
domain.net/wiki

and so on.. Some of them are more important than others and for these, I will have subdomain. Eg for forum have forum.domain.net and wiki have wiki.domain.net


So I wish to give members the opportunity to enter url http://wiki.domain.net and land on http://www.domain.net/wiki in browser.

How do I resolve this is best and what is possible. best practice?

I have all the necessary access to dns, webserver etc. so please shot on me..

Thanks in advance
 
Ok ..

Got it to work - Right now my wiki and forum subdomain part is sync on dns and later also chat .. If you want to test:

http://wiki.danskhandicapforum.dk goes to directly to my wiki part and
http://forum.danskhandicapforum.dk goes directly to my forum part..

Now - whether it is the right way to do it must be unsaid - but it works for me. It would probably be more correct with an a-record to a directory on the webserver and so in this directory have some info in a .htaccess or html/php file to redirect. It is beyond my knowledge to find out.
 
It is best to enforce just one URL per page for cookie reasons. The default cookie settings will not allow the login cookie to cross subdomains, so you can get a situation where users have to login twice, once for each URL.

You can setup a simple redirect where sub.domain.com redirects to domain.com/sub. That way no matter what URL they use to access the page they will end up on the same URL.

Is there a functional reason why you are using subdomains? If it's just for URL aesthetics then it might be best to avoid having multiple subdomains for the forum.
 
Top Bottom