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 like http://localhost/site1 instead of links like http://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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---