سؤال

This is a weird problem. We have an item on the test server showing a 404 error page when you put in the URL key after the root URL (eg. www.mystore.com/url_key), however on our local machines they don't do this. I've even restored my local database so it's identical to the test server and it's not getting a 404.

The URL rewrites are identical, both my local machine and the test server has full page cache on.

Now, we could fix it by reindexing but we want to know the cause as to why the test server is showing a 404 while a local WAMP server doesn't.

هل كانت مفيدة؟

المحلول

One explanation is your .htaccess isn't being picked up. Can you try to add in index.php in the URL and see if this solves the issue?

index.php/url_key

نصائح أخرى

How did you sync the two databases? MySQL import and export?

If you just copied the database over you have to clear the cache, because that is stored on the filesystem and has still data cached from the old database. Reindex wouldn't help in that case, because the index is also stored in the MySQL database.

Go to your DB and run this query:

INSERT INTO `report_event_types` (`event_type_id`, `event_name`, `customer_login`) VALUES
(1, 'catalog_product_view', 1),
(2, 'sendfriend_product', 1),
(3, 'catalog_product_compare_add_product', 1),
(4, 'checkout_cart_add_product', 1),
(5, 'wishlist_add_product', 1),
(6, 'wishlist_share', 1);

P.S. check DB name prefix if you have it!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top