Thread: Clean URL
View Single Post
  #2  
Old 01-13-2011, 03:36 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Clean URL

Please make sure you use a supported web server.
The Clean URLS requirements and additional information can be found here.

After that you should add the following code to the ".htaccess" file located in the directory where X-Cart is installed.

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 ]]]

In case X-Cart is installed in a sub-folder (e.g. accessed via http://yourdomain.com/xcart/) you should replace the blue part in the code above with the relative path(green) to your X-Cart installation.

In the provided example you should replace:
RewriteBase /
with
RewriteBase /xcart/

and
Code:
RewriteCond %{REQUEST_URI} !^/(payment|admin|provider|partner)/
with
Code:
RewriteCond %{REQUEST_URI} !^/xcart/(payment|admin|provider|partner)/
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote