Jump to content
Larry Ullman's Book Forums

dbecker1948

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by dbecker1948

  1. Here is the code in the .htaccess

     

    # Disable directory browsing:
    Options All -Indexes  
    # Prevent folder listing:
    IndexIgnore *  
    # Prevent access to any file:
    <FilesMatch "^.*$">
    Order Allow,Deny  
    Deny from all
    </FilesMatch>

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /ex2/
    # For sales:
    RewriteRule ^shop/sales/?$ sales.php
    # For the primary categories:
    RewriteRule ^shop/([A-Za-z\+]+)/?$ shop.php?type=$1
    # For specific products:
    RewriteRule ^browse/([A-Za-z\+\-]+)/([A-Za-z\+\-]+)/([0-9]+)$ browse.php?type=$1&category=$2&id=$3
    # For HTTPS pages:
    RewriteCond %{HTTPS} off
    RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>

     

    This file is located in the includes folder

     

    Here are the menu items

     

          <ul class="nav">
                <!-- MENU -->
                <li><a href="./shop/coffee">Coffee</a></li>
            <!--    <li><a href="/shop/coffee/">Coffee</a></li> -->
                <li><a href="./shop/shop.php">Goodies</a></li>
                <li><a href="./sales.php">Sales</a></li>
                <li><a href="./wishlist.php">Wish List</a></li>
                <li><a href="./cart.php">Cart</a></li>
                <!-- END MENU -->
                </ul>

     

    The first three will not access the pages and the last three, I simply put the reference to the correct file and they will bring up the page but it still has errors.  That's because there is so much redirections that the program seems to be confused.

     

     

     

     

×
×
  • Create New...