link magic'. Now it works...
On 29 mrt, 16:23, "Dr. Loboto" <drLob...@gmail.com> wrote:
> Sorry, misunderstood your situation. I think you cannot do anything in
> this case at all. Cake retrieve base url as dirname(env('PHP_SELF'))
> and dir is always site1 not regarding to apache alias. Check
> Dispatcher::baseUrl() method.
>
> On Mar 28, 8:18 am, Jeroen van Ingen <neob...@gmail.com> wrote:
>
> > I tried but I can't get it to work
> > I added the following lines to the httpd.conf file:
> > RewriteEngine On
> > RewriteRule ^/site2(.*) /site1$1
> > This works fine, but doesn't solve my problem. It still generates
> > links likehttp://localhost/site1insteadof links likehttp://localhost/site2
>
> > If I add the following lines to httpd.conf the server will not start
> > RewriteEngine On
> > RewriteBase /site2
> > RewriteRule ^/site2(.*) /site1$1
>
> > If I add the following line to .htaccess, it even won't work:
> > RewriteBase /site1
>
> > What am I doing wrong?
>
> > On 27 mrt, 03:50, "Dr. Loboto" <drLob...@gmail.com> wrote:
>
> > > You should add RewriteBase /site2 directive into your
> > > webroot .htaccess for site2.
>
> > > On Mar 26, 11:18 pm, Jeroen <neob...@gmail.com> wrote:
>
> > > > My Windows-PC has one http-dir called C:/xampp/htdocs/site1 and I
> > > > configured Apache to map site2 to the same location (C:/xampp/htdocs/
> > > > site1).
> > > > At the moment I configured apache as follows:
> > > > AliasMatch ^/site2(.*) C:/xampp/htdocs/site$1
>
> > > > When I go tohttp://localhost/site2/<controller>/<action> Apache maps
> > > > it to site1 and the URL in the browser the URL is stillhttp://localhost/site2/<controller>/<action>. So far, so good.
> > > > The problem is on every page the links generated are as follows:http://localhost/site1/<controller>/<action> and I want links likehttp://localhost/site2/<controller>/<action>.
>
> > > > Is it possible to let Apache generate linkshttp://localhost/site2/<controller>/<action>
> > > > on every page? If so, how?
> > > > If Apache can't generate links likehttp://localhost/site2/<controller>/<action>,
> > > > how can I let Cake generate links likehttp://localhost/site2/<controller>/<action>
> > > > when I'm 'incoming' from site2 instead of site1?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment