Friday, November 30, 2012

Excluding Directories From Open Cart - Edit .htaccess

Hi, Everyone,

I am working with Open Cart  now a days and there are many things needed be taken care of, for example I had an issue with Open Cart taking over my server :) and since I am using Friendly SEO URLs e.g. etc. this creates a situation when you have installed open cart on the root of your website "It does not let you access new sub-directories you create" so, the solution is to edit the .htaccess file on the root of your server and follow these steps;

1- Open your ".htaccess" file in a Text Editor or Dreamweaver
2- Find the line "RewriteBase /"
3- Just under this line add a new line of code "RewriteRule ^/directory-name [L]" Where "directory-name" is the name of your own directory you have already created on the server via FTP or File Manager etc.

Now when you access this newly created directory, it'll still show the Open Cart page with "Page Not Found" error, this is because open cart has put a custom 404 Page on your server, to get rid of this situation you'll have to upload an Index file (index.html, index.htm or index.php etc.) to access the directory.

I have created a custom directory on the client server to show this function; here it shows the index.html file free from the clutches of Open Cart, I believe the same solution can be applied to Word Press or other software that use .htaccess and URL Rewrite Module to present SEO Friendly or User Friendly URLs.

I applied this solution to Open Cart 1.5.4

Thanks & Enjoy !
I.Q !

No comments:

Post a Comment

Please post your thoughts :)