Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Does anyone use a local host environment on a Mac? Does your dev site work with friendly URLs ON?

Featured Replies

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.

0_1512054302963_friendly-urls-on-new-products-images-and-featured-category-images-are-camera-icons.jpg

If I turn friendly URLs OFF then everything works fine.

0_1512054462380_friendly-urls-off-new-products-images-and-featured-category-images-are-correct.jpg

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

  • 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

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.

  • 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.

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.

  • 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?

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.

  • 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.

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.

  • Author

@wakabayashi @mdekker @Traumflug Anyone - Any ideas, please?

@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?

  • 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

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).

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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".

0_1512054922540_local-site-no schema of urls but live site has schema of urls.jpg

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.

  • 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. :(

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.