Jump to content

How To Setup .htaccess For Multiple Stores


Recommended Posts

Ok. I've searched the forum and googled for info on this. Please forgive me if I overlooked it somewhere. I didn't find any .htaccess examples or info to help me....

 

I need to have 2 stores using PrestaShop 1.5.

 

The main one being at www.mymainwebsite.com/store/

 

Another store at www.mysecondsite.com ... but no /store on the end of it

 

So I need the second website to pull up the store from the database of PrestaShop 1.5 at www.mymainwebsite.com/store/

 

Do I set up some kind of mirror or forward in the .htaccess file at www.mysecondwebsite.com ?? If so what is an .htaccess code example for this situation? I do have the mod rewrite available with my server.

 

Thank you for helping me and please excuse my lack of understanding how to set it up. Gary

Link to comment
Share on other sites

Hey,

 

with Prestashop , the htaccess is auto-generated and is for all shops of the installation.

For an example of generated file, you can test the beta version ;)

 

Thank you for helping. So I do not change anything in the .htaccess file at www.mysecondsite.com to make it pull from the setup of PrestaShop 1.5 at www.mymainwebsite/store/ ?

 

I did discover a bug that said the mod rewrite was not enabled on my server, that is not true as I am using it with PrestaShop 1.4 ... so I am uploading the latest SVN to see if that solves the mod rewrite issue.

 

Gary

Link to comment
Share on other sites

PS change it in background when you create your new shop ;) Just be carefull to file permission on the .htaccess (for PS can write into).

Please report this bug in the forge if you have really the mod_rewrite installed on your server.

 

My permissions are set at 644 for the .htaccess file.

 

I'm still not sure I understand this. I have setup a second shop name My Second Site and then added the URL to it by filling in the info below:

 

Domain: www.mysecondsite.com

Domain SSL: www.mysecondsite.com

Physical URI: /

Virtual URI: (left empty)

 

Your final URL will be http://www.mysecondsite.com/

 

So when I click save I should be able to type in mysecondsite.com in the internet address bar and the shop should appear? Is there something I am missing here? Please forgive me for the lack of understanding.

 

Thank you for your extra help and patience. I am really wanting to learn this. Gary

Link to comment
Share on other sites

Got it fixed. The thing I was not doing was adding www.mysecondsite.com as an "Add on" domain in Cpanel. It couldn't be done as a parked domain. I added it as an "Add on" domain and adjusted the base to public/html/store/ and it works now... Gary

Link to comment
Share on other sites

Got it fixed. The thing I was not doing was adding www.mysecondsite.com as an "Add on" domain in Cpanel. It couldn't be done as a parked domain. I added it as an "Add on" domain and adjusted the base to public/html/store/ and it works now... Gary

 

Gary, can you tell us how you did it? There is a world full of people curious about what "base" you adjusted to public/html/store, and whether it was referring to your main store or secondary, and ...... the meaning of "base" itself. Might it be the core domain, the physical folder, the virtual folder. Everyone would really owe you one if you helped them past this first step of being able to use multi domains on 1.5 via add on. Can you give us a step by step? And did you mean /public_html/ ?

 

Naturally the second and better prize will be when the development teams provides a httpd.conf insertion for non-add on multi domain usage.

Link to comment
Share on other sites

  • 6 months later...

Got it fixed. The thing I was not doing was adding www.mysecondsite.com as an "Add on" domain in Cpanel. It couldn't be done as a parked domain. I added it as an "Add on" domain and adjusted the base to public/html/store/ and it works now... Gary

 

I did same in cPanel and BO but no result second site give me error page "Index of ..."

Can someone else to confirm if this works ?

Link to comment
Share on other sites

Hmm, I have a store in the root and another two in subdirectories.

Those two are more or less in test phases so I haven't bothered much about these things...

 

I assume that my 1.5.2 store in /handkraft auto-generates the .htaccess into "its" root (/handkraft) where it does no good.

In the root I have a 1.4.3 store so the .htaccess in / isn't auto-generated.

Should I merge the .htaccess files?

And what about robots.txt?

 

/Mats

Link to comment
Share on other sites

×
×
  • Create New...