alwayspaws Posted November 29, 2017 Posted November 29, 2017 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
alwayspaws Posted November 29, 2017 Author Posted November 29, 2017 @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
lesley Posted November 29, 2017 Posted November 29, 2017 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.
alwayspaws Posted November 29, 2017 Author Posted November 29, 2017 @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.
lesley Posted November 29, 2017 Posted November 29, 2017 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.
alwayspaws Posted November 29, 2017 Author Posted November 29, 2017 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?
lesley Posted November 29, 2017 Posted November 29, 2017 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.
alwayspaws Posted November 29, 2017 Author Posted November 29, 2017 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.
lesley Posted November 29, 2017 Posted November 29, 2017 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.
alwayspaws Posted November 29, 2017 Author Posted November 29, 2017 @wakabayashi @mdekker @Traumflug Anyone - Any ideas, please?
moy2010 Posted November 29, 2017 Posted November 29, 2017 @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?
alwayspaws Posted November 29, 2017 Author Posted November 29, 2017 @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
moy2010 Posted November 29, 2017 Posted November 29, 2017 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).
alwayspaws Posted November 29, 2017 Author Posted November 29, 2017 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
marci123 Posted November 29, 2017 Posted November 29, 2017 @alwayspaws said in Need code help with apache2 configuration for localhost: Note: I'm not using MAMP. What system are you using?
alwayspaws Posted November 30, 2017 Author Posted November 30, 2017 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
alwayspaws Posted November 30, 2017 Author Posted November 30, 2017 @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
alwayspaws Posted November 30, 2017 Author Posted November 30, 2017 @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
alwayspaws Posted November 30, 2017 Author Posted November 30, 2017 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
alwayspaws Posted November 30, 2017 Author Posted November 30, 2017 @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".
lesley Posted November 30, 2017 Posted November 30, 2017 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.
alwayspaws Posted November 30, 2017 Author Posted November 30, 2017 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. :(
moy2010 Posted November 30, 2017 Posted November 30, 2017 Is mod_rewrite installed in your local env.?
alwayspaws Posted November 30, 2017 Author Posted November 30, 2017 Yes it is installed. BTW I am on a Mac. I am in the process of trying something else. Thanks!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now