Create sub-domain

14 years 3 months ago #14857 by Dionysus
Create sub-domain was created by Dionysus
Hi There,

I registered with www.vidilife.com/

with username: doggie

then the system automatically generated a sub-domain.

doggie.vidilife.com

I was wondering if this was possible with CB?

Thanks all,
D

Please Log in to join the conversation.

14 years 3 months ago #14858 by silexian
Replied by silexian on topic Re:Create sub-domain
don't think it's related to CB but more to your hosting features.

Not a lot have that feature. Otherwise, you may write or use a script that deals with CPanel APIs.
cf http://www.hotscripts.com

help me decrease my Karma ! i AM a bad boy ;) Hurry up or i'm gonna eat your soul :p

Please Log in to join the conversation.

14 years 3 months ago #14860 by mikko
Replied by mikko on topic Re:Create sub-domain
If you own your server, you can configure your apache url rewriting engine to fetch data from CB tables.

httpd.apache.org/docs/2.0/misc/rewriteguide.html

-mikko

Please Log in to join the conversation.

14 years 3 months ago #14902 by Dionysus
Replied by Dionysus on topic Re:Create sub-domain
unfortunately, I am hosting my websites thru a hosting company.

Thanks for your comments

Please Log in to join the conversation.

14 years 3 months ago #15328 by trail
Replied by trail on topic Re:Create sub-domain
Yes this is possible. I answered this question before.

First of all, it is not really a subdomain but it is using mod-rewrite.

For this to work you need a dns server that directs *.domain.com to domain.com

Then you modify the mod_rewrite line for user homepages and it picks up the rest.

Good luck :)

DJ Trail.
CB Co-Founder & Test-Lead.
Plugins: My Age , Starsign Matchmaking Horoscope , My Visitor , My Highscores , My ProfileID ,
My Components: Import & Invite Karma Casino (Use Test / Test)
My Modules: Many :)

Please Log in to join the conversation.

14 years 3 months ago #15336 by trail
Replied by trail on topic Re:Create sub-domain
I just did it on my website..

trail.djtrail.nl tester.djtrail.nl etc etc

the rewrite line i used was

RewriteCond %{HTTP_HOST} ([^/]+)\.djtrail\.nl [NC]
RewriteCond %1 !www$ [NC]
RewriteRule ^(.*)$ www.djtrail.nl/%1 [L]

+ the old rewrite line for homepages makes:

RewriteRule ^([^/]+)/?$ index.php?option=com_comprofiler&task=userProfile&user='$1' [L]

for this to work i first had to ditch all my real subdomains (you can have both if you want a headache).. and make *.djtrail.nl go to djtrail.nl via dns settings.

DJ Trail.
CB Co-Founder & Test-Lead.
Plugins: My Age , Starsign Matchmaking Horoscope , My Visitor , My Highscores , My ProfileID ,
My Components: Import & Invite Karma Casino (Use Test / Test)
My Modules: Many :)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.414 seconds

Facebook Twitter LinkedIn