Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2007, 05:59 PM
Junior Member
 
Join Date: Jun 2007
Location: Barcelona
Posts: 8
Default Routing rule for subdomains?

Hello,
do anyone of you know how to create routing rules for subdomains?
For example how could I say:

http://user.website.com
-> controller: index
-> action: display
-> user = user

Thank you very much,
Loris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-01-2007, 12:03 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

Basically it's just like normal
PHP Code:
<?php
   $server_host 
explode(&#8217;.', $_SERVER[’HTTP_HOST’]);
   
$subdomain strtolower($server_host[0]);
   echo &
#8216;Subdomain name is: ‘ . $subdomain;
?>
take the server host and input it as your user action
__________________
Zym Framework - A Zend Framework extension library w/ demo app

SpotSec Blog:
http://spotsec.com/blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:50 PM.