.htaccess for XCART 4.4

Below is a typical .htaccess file to be used with x-cart 4.4
Change yourdomain to what ever.

Redirects from yourdomain.com to www.yourdomain.com

Also forces home.php to www.yourdomain.com

Also implements clean URL. Make sure Clean URL turned on in admin control panel within x-cart

# Clean URLs [[[
Options +FollowSymLinks -MultiViews -Indexes
<IfModule mod_rewrite.c>
        RewriteEngine On

        RewriteBase /
        DirectoryIndex home.php index.php
        RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /home\.php\ HTTP/
        RewriteRule ^(.*)home\.php$ / [R=301,L]
        RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]
        RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

        RewriteCond %{ENV:REDIRECT_STATUS} !^401$
        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]
# /Clean URLs ]]]


  1. I did followed to this .htaccess but the thing is that after editing it I am getting error 404 to X-Cart clean URLs. I think this setting doesn't works out that clean.


Post a Comment

Popular posts from this blog

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS

Automated Service Monitoring with F5, Consul and Python F5 SDK