LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > Popular web applications > Magento > [solved] cPanel - Magento - Multistore Setup

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2013, 12:49 PM
nnpro nnpro is offline
Member
 
Join Date: Feb 2013
Posts: 14
Default [solved] cPanel - Magento - Multistore Setup

Hi!
I switched to Litespeed and installed cloudlinux this weekand, most sites on the server work fine but we have an issue with a Mmagento multistore and its rewrite-rules in htaccess:

Right now this is the proper setup for magento, based on their wiki:
http://www.magentocommerce.com/knowl...i-domain-setup
http://www.magentocommerce.com/knowl...es-stores-work

The website beckenbodentrainer.info loads fine, but when you click on a link in the navigation you are redirected to the Base Webstore of the Magento-Multistore (maison-x.at)

Since on some sites we also have the problem with some CSS, images I assume the following happens:

http://beckenbodentrainer.info/ -> rewrite rule from .htaccess is being used
http://beckenbodentrainer.info/problem.html -> its not using the .htaccess and looking for the html file and this causes the redirect to the main store cause the MAGE_RUN_CODE / MAGE_RUN_TYPE is not being set.

Please help and advice.
Many thanks in advance!

Last edited by NiteWave; 02-12-2013 at 02:15 AM..
Reply With Quote
  #2  
Old 02-11-2013, 03:54 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
You can turn on rewrite logging by put

RewriteLogLevel 9

in the

<VirtualHost ...>
ServerName beckenbodentrainer.info
...
</VirtualHost>

section.

then check error log for details.
Reply With Quote
  #3  
Old 02-11-2013, 03:57 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,390
http://beckenbodentrainer.info/problem.html should still use .htaccess.

Does .htaccess have SetEnvIf Host .. only or it contains other rules?
Reply With Quote
  #4  
Old 02-11-2013, 11:54 PM
nnpro nnpro is offline
Member
 
Join Date: Feb 2013
Posts: 14
Yes it contains these rules:

RewriteCond %{HTTP_HOST} www\.maison-sensualite\.at [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:maisonsens]
RewriteCond %{HTTP_HOST} www\.maison-sensualite\.at [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

RewriteCond %{HTTP_HOST} ^maison-sensualite\.at [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:maisonsens]
RewriteCond %{HTTP_HOST} ^maison-sensualite\.at [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

RewriteCond %{HTTP_HOST} ^beckenbodentrainer\.info [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:beckenb]
RewriteCond %{HTTP_HOST} ^beckenbodentrainer\.info [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

RewriteCond %{HTTP_HOST} ^www\.beckenbodentrainer\.info$
RewriteRule ^/?$ "http\:\/\/beckenbodentrainer\.info\/" [R=301,L]
Reply With Quote
  #5  
Old 02-12-2013, 12:55 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,296
Code:
RewriteCond %{HTTP_HOST} ^www\.beckenbodentrainer\.info$
RewriteRule ^/?$ "http\:\/\/beckenbodentrainer\.info\/" [R=301,L]
should be better to change to
Code:
RewriteCond %{HTTP_HOST} ^www\.beckenbodentrainer\.info$
RewriteRule ^(.*)$ http://beckenbodentrainer.info/$1 [R=301,L]
maybe there are other rewrite rules ? these rules looks fine.
Reply With Quote
  #6  
Old 02-12-2013, 01:46 AM
nnpro nnpro is offline
Member
 
Join Date: Feb 2013
Posts: 14
SOLVED:

it appears to be working fine now.
All the 404 errors from todays' replies have been caused by commented-out rewrite rule for resources which are magento-internal and handled by index.php:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]

I've re-enabled these because Magento can't work without them.

All other rewrite problems appear to be caused by incorrectly *positioned* new rewrite rules which were added to compensate for setenv directive (which exists only in Apache, but not in Litespeed).
Rewrite rules have to be ordered correctly, because their ordering is what determines the rule precedence. So, I just moved those rules above index.php rule, and it all appears to be working now.
Reply With Quote
  #7  
Old 02-12-2013, 02:14 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,296
thanks. mark as [solved]
Reply With Quote
Reply

Tags
cpanel, cpanel kvm cloudlinux, magento

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:26 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.