@Mark

i think what he means is that if he is using url_for() or link_to() in
the templates, that it wont produce Urls with the subdomains...
is there a way to solve that ? Maybe the simplest solution would be to
make a link helper that wraps around the basic symfony link helpers

On 4 Jul., 18:06, Mark D <[EMAIL PROTECTED]> wrote:
> Hi Damien
>
> All you have to do it setup apache to redirect all *.yourwebsite.com
> to your symfony application:
>
> <VirtualHost *:80>
>     ServerAlias *.yourwebsite.com
>
>     DocumentRoot "/Users/yourname/workspace/sitename/web"
>     <Directory /Users/yourname/workspace/sitename/web>
>         AllowOverride All
>     </Directory>
>
>     Alias /sf /Users/mdeepwell/workspace/symfony/1.0.17/data/web/sf/
> </VirtualHost>
>
> Then, inside the index page (to start), or more appropriately a
> filter, use the php variable: $_SERVER['HTTP_HOST'] to figure out
> which "mymcategory".mywebsite.com you are on. Once you know which sub
> domain you are on, you can load whatever information you want.
>
> That is the full solution.
>
> Mark
>
> On Jul 4, 12:57 am, Damien <[EMAIL PROTECTED]> wrote:
>
> > Thank you for your answers.
>
> > Jacob, I saw your post, but I don't know how to redirect to a category
> > in my filter. I can not do a redirect() like in an action.
> > Moreover, I would like all my category links to be rewritten in order
> > to link to my subdomains, should I use the routing.yml? It is not
> > simple!
>
> > Damien
>
> > On 4 juil, 04:52, Jacob Coby <[EMAIL PROTECTED]> wrote:
>
> > > I brought this very same question up 2 days ago.  Check out the  
> > > Symfonians filter source - it has what you need.
>
> > >http://groups.google.com/group/symfony-users/browse_thread/thread/b48...
>
> > > On Jul 3, 2008, at 12:20 PM, Damien wrote:
>
> > > > Hi!
>
> > > > I have a website built with symfony, organized with categories. I
> > > > would like to have a subdomain for each category. For example:
>
> > > > mymcategory.mywebsite.com
>
> > > > I made my subdomain and catch it in my apache webserver, but I don't
> > > > know how to make it available in my website.
> > > > I tought to build a new route in my routing.yml like:
>
> > > > subdomain:
> > > >  host: mycategory.mywebsite.com
> > > >  url:    /
> > > >  param: {module: category, action: show, name: mycategory}
>
> > > > It doesn't work. Should I use it or make a filter ? But I don't know
> > > > how to make this type of filter.
>
> > > > I hope you will be able to help me.
>
> > > > Thank you
>
> > > > Damien Gougeon
>
> > > --
> > > Jacob Coby
> > > [EMAIL PROTECTED] Masquer le texte des messages précédents -
>
> > > - Afficher le texte des messages précédents -
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to