November 29, 20179 yr Before reading the below, please note that it is not an “image” problem. In my thirtybees local environment If I turn Friendly URL’s ON, I get “page not found” after clicking anything from the home page. A side effect is that “new products” images and “featured category” images are camera icons. If I turn friendly URLs OFF then everything works fine. Below is the code contained in my Virtualhost apache2 configuration and the .htaccess with URL rewrites (friendly URLs) set to "ON". I had to attach a plain text file because when I entered the code directly in this message, there was some strange formatting. 01511917536618Virtualhost-apache2-conf-and-htaccess-with-rewriteON.txt
November 29, 20179 yr Author @mdekker @lesley @Traumflug can you please look at the code and let me know what is wrong? I’m on a deadline because I have to leave my current hosting plan for a downgraded one. That means I have to delete my test site. Appreciate any help you can give me. Thank you, Stephanie
November 29, 20179 yr The settings need to be in the htaccess, not the https.conf, thirty bees should make a htaccess by default when you safe on the seo and urls page. I would start debugging by turning off the canonical url redirect on the seo and urls page.
November 29, 20179 yr Author @lesley Thanks. I’ll turn on debug mode because I generated the htaccess file to refresh it when switching back and forth between friendly and no friendly URLs.
November 29, 20179 yr Debug mode should not affect it, this is the setting I am talking about. http://storage2.static.itmages.com/i/17/1129/h15119661733132358_4c585f98e2.png change it to no redirection.
November 29, 20179 yr Author Oh I see. Thanks! Will that be the default setting for my local environment or is that just a test to see why it’s not working?
November 29, 20179 yr It should be a setting you try to see if it fixes the problem. I do not use a mac, so I don''t know the quirks with mamp.
November 29, 20179 yr Author In Prefs - SEO & URLs I have friendly URL set to "yes". Redirect to the canonical URL: I set it to "No redirection". Saved. I regenerated the htaccess file and saved. I still have the same problem of PAGE NOT FOUND. I also turned on "Disable Apache's mod_security module" but that doesn't help, either. Note: I'm not using MAMP.
November 29, 20179 yr Hmm I have no clue, its difficult to debug local installations because there is no access. That is why I always opt for doing dev sites online most of the time.
November 29, 20179 yr @alwayspaws @alwayspaws said in Need code help with apache2 configuration for localhost: In Prefs - SEO & URLs I have friendly URL set to "yes". Redirect to the canonical URL: I set it to "No redirection". Saved. I regenerated the htaccess file and saved. Were these settings the same prior to the error? Do you recall what else did change before you started getting these 404s?
November 29, 20179 yr Author @moy2010 Yes, the same. I didn't change anything because this is a brand new installation. I just changed to Lesley's suggestions. Were you able to look at the images in my other forum post from yesterday? The link is above. Any more ideas, please? Thanks! Stephanie
November 29, 20179 yr Try to copy the generated urls for the product pages and images and compare with and without the friendy URL setting enabled. This will give you an insight to the source of the problem (i.e. it might be a simple browser cache problem).
November 29, 20179 yr Author The first thing I do with these problems is obliterate the cache in all three browsers. Maybe I need a 4th browser. :) (good thing for password vaults.) Anyway: With friendly urls ON, the links look like this, but I get the 404 Page not Found: http://thirtybees.local/holidays-and-events/puppies-and-dogs-festive-christmas-hair-bow With friendly urls OFF, the links look like this, but the pages are correct: http://thirtybees.local/index.php?id_product=502&controller=product
November 29, 20179 yr @alwayspaws said in Need code help with apache2 configuration for localhost: Note: I'm not using MAMP. What system are you using?
November 30, 20179 yr Author My localhost environment is as follows: Mac desktop with macOS High Sierra version 10.13.1 The software is: Mac terminal to start and stop apache. MySQL Database Server Sequel Pro
November 30, 20179 yr Author @lesley can I add the images here and delete the other forum post. I'm having to duplicate my replies. The other forum post: https://forum.thirtybees.com/topic/1131/friendly-url-s-on-in-local-environment-404-pages-not-found/3
November 30, 20179 yr Author @lesley I updated this post but cannot delete the other post: https://forum.thirtybees.com/topic/1131/friendly-url-s-on-in-local-environment-404-pages-not-found/2
November 30, 20179 yr Author marci123 about 18 hours ago Depending on your operating system and server it could be a problem with the image path. Windows for example is using backslashes for the absolute path such as H:\xampp\htdocs the browser url is using slashes http://localhost/… Could it be that there is a wrong image path defined somewhere? Hi, Marci, Everything is forward slashes in my browsers for all websites, but that’s quite a good observation. I’ll examine the code. How do you interpret it: http://thirtybees.local/index.php?id_category=51&controller=category Is it homepage / category 51 / subcategory? For this one: I can see that the number is my product ID: http://thirtybees.local/index.php?id_product=360&controller=product
November 30, 20179 yr Author @lesley I may have tracked down the problem unless "SCHEMA of URLs' is located elsewhere in my TB local environment. Is there anywhere else it can be? On the left of the image is my local environment. It does not have "SCHEMA OF URLS". The right half is my live site Prefs - SEO & URLs and it does have "SCHEMA OF URLS".
November 30, 20179 yr Hmm that is very strange, I do not know what would cause that. I don't really know what to suggest other than maybe trying to install it again. Local host issues are the toughest to debug since there is no access.
November 30, 20179 yr Author LOL. I "heard" that the first time but forget about it being a local environment. It has almost all the exact settings as my test site online does, so maybe someone else can come up with something. I'm so good at asking what no one has ever heard of before. I do this all the time, in public and online. :) I'll reinstall as a last resort. :(
November 30, 20179 yr Author Yes it is installed. BTW I am on a Mac. I am in the process of trying something else. Thanks!
Create an account or sign in to comment