Jump to content
Larry Ullman's Book Forums

dbecker1948

Members
  • Posts

    3
  • Joined

  • Last visited

Everything 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.
  2. I have read the book!, but the Mod_rewrite statements will not access the menu items. I have tried all the suggestions in the book. I am trying to use this book in a university course and regret my decision. Could you please send me a working site and the code that really does work?
  3. I am using this book in a course at an university. I copied the password_hash.php and saved it to the includes folder. How do I include the file, I guess what I really mean is where do I include the file. I have tried the MySQL.ini.php.
×
×
  • Create New...