subdomain.domain.com => domain.com/subdomain

Using a single web hosting account to host multiple sites

subdomain.domain.com => domain.com/subdomain

Postby kriske » Fri Apr 09, 2004 4:22 am

Hi,

I need a simple ModRewrite-code to create those 2 examples

subdomain.domain.com => domain.com/subdomain
subdomain.domain.com => domain.com


Thanks,
Kristof
kriske
 
Posts: 1
Joined: Fri Apr 09, 2004 4:15 am
Location: Belgium

sub.domain.de -> domain.de/sub

Postby festus » Tue May 25, 2004 4:49 am

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.de$
RewriteCond %{HTTP_HOST} !^www\.domain\.de$
RewriteRule (.*) http://domain.de/%1$1 [P]
festus
 

Postby Guest » Tue Jun 15, 2004 1:54 pm

A simple question.. Where do I place this code?

Silly question I know but I gues it won't be so hard for you guys to help me that way :wink: :confused:
Guest
 

Postby seomike » Tue Jun 15, 2004 8:05 pm

just put it in your .htaccess file :)
seomike
 
Posts: 331
Joined: Thu May 06, 2004 7:36 pm
Location: Dallas

Postby vigo » Tue Aug 03, 2004 5:33 am

yes but if i want to create dynamically the subdomain? it's obiouvsly that the code has to be placed on .htaccess files... but the code you wrote had to be placed on the subdomain htaccess file... and if i can't create the subdomain? because i need to use this code to create 2000 subdomain?
vigo
 

Postby seomike » Tue Aug 03, 2004 12:16 pm

just put the .htaccess file in the root folder since your subdomains are dynamic.
seomike
 
Posts: 331
Joined: Thu May 06, 2004 7:36 pm
Location: Dallas

!!!!!!!!!!!! 2000 subdomain !!!!!!!!!!!!!!!!

Postby SID » Sat Jan 22, 2005 10:23 am

!!! 2000 subdomains - will it work? What is the max amount of subdomains you can create without problems?

I would be interested in this but where is the info held that matches each subdomain with its user? Does anyone know if it is possible to call up info into .htaccess while it is being processed say in the same way as when you
just put the <script> </script> tags in a html file but hold the file elsewhere? Can this sort of thing be done with .htaccess say from a file or a database? To determine from an entered subdomain if a user/subdomain exists and if so "go there" but if not go to "index.php" so that a signup process could begin on creation of "available subdomain".
SID
 
Posts: 2
Joined: Sat Jan 22, 2005 9:36 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 84 guests

cron