X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Subdirectories not resolving when XC5 is installed on the root (https://forum.x-cart.com/showthread.php?t=71610)

ant99 03-12-2015 11:12 PM

Subdirectories not resolving when XC5 is installed on the root
 
My XC5 installation is on the root of our site i.e. - installed at '/'. We also have a WordPress blog installed at '/blog/'. We also have a Live Chat software installed at '/live/'. The blog & live directory were working properly with XC4, but when we moved and upgraded to XC5 on the root, we're getting Forbidden errors and sometimes the x-cart 404 page is served. How can I get the /blog/ and /live/ directories to resolve properly? Permissions / Ownership have not been changed for any of those files. We are using clean URLs in x-cart.

Here is the /blog/ error.

Code:

Forbidden

You don't have permission to access /blog/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


When I visit oursite.com/live the URL is redirected to oursite.com/live/?url=live&last=&rest=&ext=. The page I see there is the x-cart 404 page.

Any thoughts?

tony_sologubov 03-18-2015 06:16 AM

Re: Subdirectories not resolving when XC5 is installed on the root
 
It works properly on my fresh installation of 5.1.11.
Could you please let me know the content of your .htaccess file from X-Cart's root?

ant99 01-22-2016 02:21 PM

Re: Subdirectories not resolving when XC5 is installed on the root
 
Sorry for the delay Tony, but this is still a problem we're running into. Here is the HTACCESS file from the root.

Code:


# vim: set ts=2 sw=2 sts=2 et:
#
# Apache/PHP settings
#
# @author    Qualiteam software Ltd <info@x-cart.com>
# @copyright Copyright (c) 2010-2014 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
# @license  http://www.x-cart.com/license-agreement.html X-Cart 5 License Agreement
# @link      http://www.x-cart.com/

Options -Indexes
DirectoryIndex cart.php
FileETag none

<IfModule mod_rewrite.c>
  RewriteEngine on

  # #BUG-772 Add HTTP_AUTHORIZATION header for fastCGI (need for XC\Qiwi)
  RewriteCond %{HTTP:Authorization} ^(.*)
  RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

  RewriteRule (^|/)\. - [F]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^sitemap.xml(\?.+)?$ cart.php?target=sitemap [NC,L,QSA]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)(/?)(\.([_a-z0-9-]+))?$ cart.php?url=$5&last=$4&rest=$3&ext=$7 [NC,L,QSA]

  RewriteBase /
</IfModule>

<IfModule mod_expires.c>

  # Expire images/js/css header
  ExpiresActive On
  ExpiresDefault A0

  # Images expires in 2 weeks
  ExpiresByType image/png A1209600
  ExpiresByType image/gif A1209600
  ExpiresByType image/jpg A1209600
  ExpiresByType image/jpeg A1209600
  ExpiresByType image/ico A1209600
  ExpiresByType image/x-icon A1209600

  # CSS/JS now work with dynamic unique query string. 1 year expires
  ExpiresByType text/css A31104000
  ExpiresByType text/javascript A31104000
  ExpiresByType application/javascript A31104000

</IfModule>


totaltec 01-22-2016 05:59 PM

Re: Subdirectories not resolving when XC5 is installed on the root
 
ant99,
There is another forum thread for this somewhere. But look here near the bottom of the page for an explanation: http://xcartguru.com/knowledge-base/x-cart-5-kb/

ant99 01-27-2016 02:24 PM

Re: Subdirectories not resolving when XC5 is installed on the root
 
Hi Mike,

That worked out perfectly, and solved the problem. Very simple fix. Thank you guru! :)

Byron 11-07-2017 03:23 AM

Re: Subdirectories not resolving when XC5 is installed on the root
 
Quote:

Originally Posted by totaltec
ant99,
There is another forum thread for this somewhere. But look here near the bottom of the page for an explanation: http://xcartguru.com/knowledge-base/x-cart-5-kb/


Hi, I'm having this exact problem, but the link above with a solution no longer works.

X-cart is installed in the root, /blog gives me a 404 error.

All help appreciated :)

My htaccess looks like this:
Code:

# Clean URLs [[[
Options +FollowSymLinks -MultiViews -Indexes
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
            RewriteCond %{REQUEST_URI} !^/(payment|admin|provider|partner)/
        RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico)$
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-l
        RewriteRule ^(.*)$ dispatcher.php [L]
</IfModule>
# /Clean URLs ]]]


qualiteam 11-09-2017 09:45 PM

Re: Subdirectories not resolving when XC5 is installed on the root
 
Quote:

Originally Posted by Byron
Hi, I'm having this exact problem, but the link above with a solution no longer works.


Your signature states that you use X-Cart 4, not X-Cart 5 being discussed in this forum thread.
What X-Cart version you need a solution for?

Byron 11-10-2017 02:40 AM

Re: Subdirectories not resolving when XC5 is installed on the root
 
Hi, apologies I hadn't updated my signature.

I'm using version 5.

qualiteam 11-13-2017 06:02 AM

Re: Subdirectories not resolving when XC5 is installed on the root
 
.htaccess in my local X-Cart 5.3.4.1 installation is different.

Or is it the Wordpress' .htaccess file from /blog directory? If so, you should tweak the .htaccess in the web root directory and make it not redirect URLs starting with /blog to the X-Cart script.


All times are GMT -8. The time now is 04:56 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.