Dynamic sub domain with mod rewrite

Discussions about Apache mod Rewrite, .htaccess, Use, experiences ... URL Rewriting.

Moderator: Moderators

Dynamic sub domain with mod rewrite

Postby JanoF » Thu Jun 01, 2006 5:34 pm

I'd like repair rewrite record
from -http://www.domain.tld/index.php?mforum=xxx
on -http://xxx.domain.tld/
He knew could somebody help???
User avatar
JanoF
 
Posts: 43
Joined: Tue May 30, 2006 4:01 pm

Advertisement

Postby dcz » Thu Jun 01, 2006 6:40 pm

Well, this is something a bit harder to achieve than just standard mod rewrite.

First your DNS server must accept wildcards. Meaning, you want your DNS server to redirect *.example.com to the same folder.

This is usually only possible with dedicated servers, and not under all installation. Apache and Bind are good to use here.

And there is a possible copyright issue, because, one can create a sub domain by just posting a link to it, like registered-brand.example.com.

So you must check what's going on here when you start playing with such settings.

The minimum is to make sure you check the sent vars (here the subdomain name) are ok before you do anything with it, you don't even want to show your index on those, better a warning page and a mail sent to you to react (eg implementing rules to disallow the use of all sensible subdomain name that would have been tested).

So you'd better think about it before you go for it, because you will need good skills to properly manage the new possibilities given by a DNS wild-carding setting.

And since it's not something to put on in one day, I prefer to talk a bit more before posting some code.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm


Return to Apache mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Google Adsense [Bot] and 7 guests