Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
useing Subdomains!

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help
View previous topic :: View next topic  
Author Message
aghahamidgol
New one
New one


Joined: 29 Aug 2006
Posts: 2
Location: ENGLAND / PERSIA

PostPosted: Tue Aug 29, 2006 7:36 am    Post subject: useing Subdomains! Reply with quote

hi i make a regester form for users with ajax ...
for example someone made this user " heam " and his profile is here: "www.mysite.com/profile=etc ........"

i want to give http://heam.mysite.com to this user and when you are going to type :
username.mysite.com will direct to www.mysitet.com/prifle=etc.......

who can help me to do it ? i have to edit some files in server or no ?
i am waiting for answer and i am sorry for poor english ! i will study
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Snyke
Forum Assistant
Forum Assistant


Joined: 20 Jun 2006
Posts: 87
Location: Zurich

PostPosted: Tue Aug 29, 2006 2:28 pm    Post subject: Reply with quote

Well actually this can be easily archieved just do something like this:
Code:
$user = substr($_SERVER['HTTP_HOST'],0,strstr($_SERVER['HTTP_HOST'],"."));
header("Location: http://www.host.com/blabla?user=" . $user);
exit(0);

Nothing really ajax related. But I'd say that giving users an own subdomain is really nice Very Happy
_________________
[::[ Snyke.net ]::]
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
adamwulf
New one
New one


Joined: 30 Aug 2006
Posts: 3

PostPosted: Wed Aug 30, 2006 5:28 pm    Post subject: Reply with quote

I've been curious about the same thing actually.

Snyke, do you know if/how to use ModRewrite to do a similar thing, instead of php? On one of my sites i need to have essentially the subdomain used as a category.

For instance,

dogs.myfakeurl.com would rewrite to www.myfakeurl.com/pets.php?cat=dogs

ideas?
_________________
Jotlet Online Calendar
Simply Spectacular Time Management
www.jotlet.net
Back to top
View user's profile Send private message Send e-mail
deejay
Forum Assistant
Forum Assistant


Joined: 17 May 2006
Posts: 78
Location: Netherlands

PostPosted: Mon Sep 04, 2006 7:04 am    Post subject: Reply with quote

got this from the mod rewrite forum,

dns wildcard (*) must be enabled for subdomains

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com$ [NC]
RewriteRule !^members\.php$ /members.php?membername=%1 [QSA,L]
_________________
please correct me if i am wrong
seo-expertglobalwarming
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Snyke
Forum Assistant
Forum Assistant


Joined: 20 Jun 2006
Posts: 87
Location: Zurich

PostPosted: Mon Sep 04, 2006 2:09 pm    Post subject: Reply with quote

Nice work DJ,

haven't had much to do with mod_rewrite yet myself.
_________________
[::[ Snyke.net ]::]
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert