cancel
Showing results for 
Search instead for 
Did you mean: 

When a page has .html at the end I get a 404 page

When a page has .html at the end I get a 404 page

I have two identical sites, a development and a production. They have the same .htaccess file. On the dev site when i go to example.com/test.html it will give me a 404 error. If I go to example.com/test it works fine. This behavior doesn't happen on the production site. What setting am I looking for on dev? I know I could force it with .htaccess but I would prefer if the dev and prod stay as close as possible in code.

 

I wanted to add that both product and category url suffix are blank for both sites.

4 REPLIES

Re: When a page has .html at the end I get a 404 page

Hi @TylerWolf,


What if test.html? I mean, a CMS page, a product, a category? Or maybe a custom module?

 

Can you check on System -> Configuration -> Catalog -> Catalog -> Search Engine Optimization if suffix values are the same on both instances?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: When a page has .html at the end I get a 404 page

It was all product category pages. The suffix values were the same for both. I got it fixed.

For anyone else who comes across this here is what I did.

1. Added .html back into the suffix and reindexed.

2. Removed .html from the suffix and reindexed.

 

Everything works again.

 

Re: When a page has .html at the end I get a 404 page

Thanks for giving your solution, I'm sure it will help somebody in the future!

Leslie B.
Aspiration Hosting - Magento 1 & 2 Optimized Cloud Hosting
Problem solved? Click Accept as Solution!

Re: When a page has .html at the end I get a 404 page

Thanks for solution it help me too...