Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2006
    Posts
    15
    Plugin Contributions
    0

    Default htaccess file meaning of

    Hi
    Just wanted to get some Info on the importance of the .htaccess file (and maybe robots.txt) while I am at it.

    I recently made a Site (www.sasupplies.com) and while the Site was showing up fine in Google and other Search Engines I struggled with getting it to show up in our local South African Search Engine (www.ananzi.co.za). As most if not all our Sales would come from the local S.A Market I tried everything to get the Site Listed .Thats confusing- It WAS listed but would not show up for any Searches against it ( I even created some fairly unique Custom Products and searched for them but NO Results came back.) Even more confusing was the fact that if I made a general Search on Ananzi no results were returned But If I chose to search the "SA Directory" , the Site did come back. I checked Metatags etc but could not find a Fault. Then decided to delete the htaccess file and now the Search yields results.
    Just wondering if there is something wrong with this File: Copy below and If I should restore if for any Reason. I have got no Idea how this htaccess was created, but if there is something like a Sample htaccess file which I could use please advise.
    Regards
    Manfred

    COPY OF HTACCESS

    <IfModule mod_php4.c>
    php_value session.use_trans_sid 0
    </IfModule>
    RewriteEngine On
    #RewriteBase /sNews15
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^(.*) $1 [L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?category=$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([a-z_]+)/([^/]+) index.php?category=$1&title=$2 [L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([a-z_]+)/([^/]+)/([^/]+)/ index.php?category=$1&title=$2&commentspage=$3 [L]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([a-z0-9_-]+)/([0-9]+)/ index.php?category=$1&nbsp;articlespage=$2 [L]

  2. #2
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Plugin Contributions
    0

    Default Re: htaccess file meaning of

    You do not need ANY of that at all. the only line you "need" is a 404 error handler if you wish to use the 404 error page included with zencart and editable in the define pages editor in the admin. In that case delete all that stuff in there, the file should simply read:


    ErrorDocument 404 /index.php?main_page=error404


    otherwise jut delete the entire file from your server.
    Grasshopper, GOT BOOK? - I don't, and I am constantly in here begging for help and Donating to Zen Cart in feeble attempts to bribe the developers for help. Get your copy today and avoid my fate!

  3. #3
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Plugin Contributions
    0

    Idea or Suggestion Re: htaccess file meaning of

    Quote Originally Posted by ramblas View Post
    Hi
    Just wanted to get some Info on (and maybe robots.txt) while I am at it.

    as for robots.txt, if you want all spiders (robots) to have complete access to your site, then it should contain the lines:

    User-agent: *
    Disallow:

    If there are pages you want to stop all spiders from seeing/indexing, you would put:

    User-agent: *
    Disallow: /index.php?main_page=login
    Disallow: /index.php?main_page=shopping_cart

    you put a Disallow: for each page you want to stop them from indexing.

    If there is an unfriendly robot you want to block from accessing your site at all, then you can put lines like:

    User-agent: brown_recluse__spider_bot
    Disallow: *

    User-agent: blackwidowspiderbot
    Disallow: *

    you put each spider you want to block on its own line. the * of course is a universal wildcard telling it not to go to any page on your site. If you want to block a specific robot from just 1 page instead of a (*) wildcard use its name:

    User-agent: brown_recluse__spider_bot
    Disallow:
    /index.php?main_page=login
    Disallow: /index.php?main_page=shopping_cart

    You can also tell the spider where your sitemap is, usually it has to be in root directory of site to be accepted:

    Sitemap: http://www.mysite.com/sitemap.txt

    Those are the basics of robots.txt and if you look about i'm sure there is better info than this on it..

    I hope I didn't confuse you. Good Luck!
    Grasshopper, GOT BOOK? - I don't, and I am constantly in here begging for help and Donating to Zen Cart in feeble attempts to bribe the developers for help. Get your copy today and avoid my fate!

  4. #4
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: htaccess file meaning of

    Before you delete anything in that file, I would make a backup. The contents of that file (in your case) specifically turns on the "mod re-write engine" which is used to transform URLs from this (as an example): http://www.yoursite.com/product.php?id=1&cat=2 (etc..)

    to something more search engine friendly like:

    http://wwwyoursite.com/cell-phone-xyz.html

    If you you are using that type of feature with your current cart, removing those lines from the .htaccess file will eliminate that functionality.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  5. #5
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Plugin Contributions
    0

    Default Re: htaccess file meaning of

    Quote Originally Posted by econcepts View Post
    Before you delete anything in that file, I would make a backup. The contents of that file (in your case) specifically turns on the "mod re-write engine" which is used to transform URLs from this (as an example): http://www.yoursite.com/product.php?id=1&cat=2 (etc..)

    to something more search engine friendly like:

    http://wwwyoursite.com/cell-phone-xyz.html

    If you you are using that type of feature with your current cart, removing those lines from the .htaccess file will eliminate that functionality.

    He already has a backup copy, in his original post ;)
    Grasshopper, GOT BOOK? - I don't, and I am constantly in here begging for help and Donating to Zen Cart in feeble attempts to bribe the developers for help. Get your copy today and avoid my fate!

 

 

Similar Threads

  1. .htaccess file 1.3.9h ?
    By Muzz in forum General Questions
    Replies: 4
    Last Post: 18 Dec 2010, 03:40 AM
  2. htaccess File Necessary?
    By dkjwebs in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 10 Aug 2008, 05:59 AM
  3. .htaccess file
    By mrbert in forum General Questions
    Replies: 0
    Last Post: 22 Apr 2007, 10:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg