Part of the EllisLab Network
   
 
subdomain = controller
Posted: 20 November 2006 02:56 PM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  27
Joined  11-16-2006

I was wondering if anyone has tried using the subdomain as the controller on the fly. E.x. http://controller1.domain.com/method/ http://controller2.domain.com/method/

I’m trying to figure out a way to get this done. Any suggestions?

 Signature 

Xuru Internet Marketing

Profile
 
 
Posted: 20 November 2006 04:49 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  481
Joined  03-08-2006

Yep, it should be possible.

Apache config

<VirtualHost 127.0.0.1>
    
DocumentRoot c:/wamp/www/codeigniter/test
    ServerName  example
.com *.example.com
</VirtualHost>

c:/wamp/www/codeigniter/test/.htaccess

RewriteEngine On
RewriteBase
/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond
%{HTTP_HOST} ^([^.]+)\.example\.com
RewriteRule
^(.*)$ index.php/%1/$1 [L]

 Signature 

Flickr | Last.fm | Del.icio.us

Profile
 
 
Posted: 24 January 2007 10:08 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  102
Joined  04-19-2006

Hey Craig, That works pretty good. I got one for you though?

How about this

http://uri2.domain.com/uri1/uri3/etc.

http://method.domain.com/controller/uri3/etc.

Any Idea?

 Signature 

Palm Beach Printing

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 64453 Total Logged-in Users: 17
Total Topics: 80961 Total Anonymous Users: 0
Total Replies: 435694 Total Guests: 204
Total Posts: 516655    
Members ( View Memberlist )