binunice Posted May 24, 2014 Share Posted May 24, 2014 (edited) Hi, We are using PS 1.5.4.1 on Nginx in Ubuntu Server . We need to enable multistore functionality. We have configured the same. But when we access shop using virtual URL and same as set as 'Main URL', it shows the all pages with out any JS/CSS. All the JS/CSS links are changed to domain.com/shopname/xxx.css And when it is not set as "Main URL" it shows a blank page. Additionally in Virtual URL block, it shows 'You need to activate URL Rewriting if you want to add a virtual URL.' Its working perfectly fine in main store but not working with virtual URLs. Do I need to copy all the files in each directory of each Virtual shop? Somebody please help me. Regards Binu Edited May 24, 2014 by binunice (see edit history) Link to comment Share on other sites More sharing options...
binunice Posted June 4, 2014 Author Share Posted June 4, 2014 (edited) 130+ views - It means there are other users also having same problem. Pls help us. Edited June 4, 2014 by binunice (see edit history) Link to comment Share on other sites More sharing options...
xlynx Posted June 24, 2014 Share Posted June 24, 2014 Hey, I have the same issue, i don't know which part of htaccess controls the virtual URL to convert it to nginx rule. Any help is welcome Best Link to comment Share on other sites More sharing options...
xlynx Posted June 24, 2014 Share Posted June 24, 2014 (edited) I tried in a local environment, and when adding the virtual URL it generates in the htaccess this lines : RewriteCond %{HTTP_HOST} ^domain.com$ RewriteRule ^test$ /test/ [L,R] RewriteCond %{HTTP_HOST} ^domain.com$ RewriteRule ^test/(.*) / [L] I used an auto generator (from apache to nginx) : # nginx configuration location / { if ($http_host ~ "^domain.com$"){ rewrite ^/test$ /test/ redirect; } if ($http_host ~ "^domain.com$"){ rewrite ^/test/(.*) / break; } } It loads the page, but it doesn't load some files and the friendly url of the first shop are broken. Edited June 24, 2014 by xlynx (see edit history) Link to comment Share on other sites More sharing options...
binunice Posted June 24, 2014 Author Share Posted June 24, 2014 Finally, I got derived at a solution. Here it is Add this portion inside server directive of nginx conf : if ($http_host ~ "^domain.com$") { rewrite ^/store1/(.*) /$1 last; rewrite ^/store2/(.*) /$1 last; rewrite ^/store3/(.*) /$1 last; break; } Where domain.com is domain name and store1, store2 and store3 are 3 stores. Link to comment Share on other sites More sharing options...
Recommended Posts