Форуми / Cotonti / General / User Names as Subdomains

Macik
#36842 20.01.2013 21:34

What version do you use (Genoa/Siena)?
What aim you want to achieve? 

To be cleared… You can not «drive» this system for full without modifying «.htaccess». It's a two-ends system - one part is defined with «urltrans.dat» that force CMS to automatic (with cot_url function) translate URL to «magic» format you need. Second part is .htaccess that takes site user coming with «magic» URL to a CMS real address.

So, if you need user get profile details by accessing URL like http://username.yousite.com/  you must check this steps (actual for Siena version):

1. install «URL Editor» plugin
2. select «Custon urltrans.dat» in settings of «URL Editor»
3. Make rule in Admin page of «URL Editor», like this:
     users         m=details&u=*     http://{$u}.{$_rhost}{$_path}index.php

Now you will get URL like:  http://admin.site.com/index.php?m=details    with executing cot_url('users','m=details&u=admin') some where on site.

4. Make changes in .htaccess to propper «translate» http://admin.site.com/index.php?m=details in normal  http://site.com/users.php?&m=details&u=admin

 

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F