Jump to content
Larry Ullman's Book Forums

michaelnwani

Members
  • Posts

    10
  • Joined

  • Last visited

michaelnwani's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you, I modified almost everything by putting a "/html/" infront of links and such and they seem to work now, but I have a problem with displaying product images now. On the home page, where Sale Items is listed to the right, the four pictures won't come up, and no picture displays when I click on the link to Sales for example. I also put a "html/" in my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine on # For sales: RewriteRule ^html/shop/sales/?$ sales.php # For the primary categories: RewriteRule ^html/shop/([A-Za-z\+]+)/?$ shop.php?type=$1 # For specific products: RewriteRule ^html/browse/([A-Za-z\+\-]+)/([A-Za-z\+\-]+)/([0-9]+)$ browse.php?type=$1&category=$2&id=$3 # For HTTPS pages: RewriteCond %{HTTPS} off RewriteRule ^html/(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule>
  2. Yeah it is, I'm just trying to make sure how to set up everything for it to work perfectly. I don't think I'm supposed to have /html/ in that header information even though that makes it work, although my file setup I thought was correct. For instance when I click on one of those links after inputting /html/, the url doesn't come up as "/shop/whatever" anymore, instead it comes up as "/html/whatever", and I think that's conflicting with the goal and purpose of the .htaccess: <IfModule mod_rewrite.c> RewriteEngine on # 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>
  3. I definitely understand but is that what you had recommended for this coffee tutorial? For example your menu code was this, so I wanted to make mine work the same: <!-- MENU --> <li><a href="/shop/coffee/">Coffee</a></li> <li><a href="/shop/goodies/">Goodies</a></li> <li><a href="/shop/sales/">Sales</a></li> <li><a href="/wishlist.php">Wish List</a></li> <li><a href="/cart.php">Cart</a></li> <!-- END MENU -->
  4. I just put in localhost:8888 and then my folder choices come up, with html being one of them. And when I click on html it takes me to the index.php page, and the browser is stated as "localhost:8888/html", not even index.php.
  5. My server root, would it be BASE_URL? Because I had already changed it to localhost:8888/html/ and it did not affect anything
  6. Quite strange... adding in "/html/" makes these links work and even the css appeared on the page: <link href="/html/css/style.css" rel="stylesheet" type="text/css" /> <ul class="nav"> <!-- MENU --> <li><a href="/html/shop/coffee/">Coffee</a></li> <li><a href="/html/shop/goodies/">Goodies</a></li> <li><a href="/html/shop/sales/">Sales</a></li> <li><a href="/html/wishlist.php">Wish List</a></li> <li><a href="/html/cart.php">Cart</a></li> <!-- END MENU --> </ul> I think I have to /html/ everything, including images if I want them to appear but I honestly am not sure why.
  7. I changed the folder to html (I had to do it as html2 before but I had another folder named html however I changed its name), and made this my config: define ('BASE_URI', '/Applications/MAMP/htdocs/html/'); define ('BASE_URL', 'localhost:8888/Applications/MAMP/htdocs/html/'); define ('MYSQL', '/Applications/MAMP/htdocs/mysql.inc.php'); I also tried just 'localhost:8888/html/' as the BASE_URL, however the problem still persists :/. It just gives me (for example) "Not Found The requested URL /shop/coffee/ was not found on this server." on any link I click, and the styling still won't appear so it's a blank screen... I have my folder set up the exact same way as in your examples
  8. Just providing more information that I'm guessing may be relevant to helping resolve this issue... In my header.html, I have this as the menu code <!-- MENU --> <li><a href="/shop/coffee/">Coffee</a></li> <li><a href="/shop/goodies/">Goodies</a></li> <li><a href="/shop/sales/">Sales</a></li> <li><a href="/wishlist.php">Wish List</a></li> <li><a href="/cart.php">Cart</a></li> <!-- END MENU --> I'd also like to think I am allowed .htaccess overrides by the hosting company because the change in the url is actually reflected as /shop/whatever and the .htaccess in my includes is also reflected.
  9. As for my stored procedures, they seem to have worked as in they all appear under my coffee database ("coffeedb") in the Routines section, and I tested them.
  10. Hello everyone, PHP Version 5.3.6 Running MAMP Version 2.0.5 and everything else seems to be up to date I'm having some troubles with displaying the website and .htaccess, if you would be so kind as to assist me. My html isn't appearing on the main page, and when I click on any link, like for instance Sales, I get the error "Not Found. The requested URL /shop/sales/ was not found on this server." I just figure the more information I give, the easier it is to see the problem. All of my files are inside htdocs/html2, and my .htaccess root file is right in the html2 folder: <IfModule mod_rewrite.c> RewriteEngine on # 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> I then have the .htaccess implemented in your (Larry Ullman) book in my includes directory: # Disable directory browsing: Options All -Indexes # Prevent folder listing: IndexIgnore * # Prevent access to any file: <FilesMatch "^.*$"> Order Allow,Deny Deny from all </FilesMatch> I'm not positive if these have anything to do with it but in my config.inc.php in the includes directory, I have these as my settings: define ('BASE_URI', '/Applications/MAMP/htdocs/html2/'); define ('BASE_URL', 'localhost:8888/'); define ('MYSQL', '/Applications/MAMP/htdocs/mysql.inc.php'); Images aren't appearing, too... I have my header and footer.html's in my includes folder, entirely the same structure as you had
×
×
  • Create New...