cancel
Showing results for 
Search instead for 
Did you mean: 

Homepages routing issue (404)

Homepages routing issue (404)

I have Magento 2.4.7-p4 installed.

My setup:
- One Store view for Dutch (store code = nl)
- One Store view for English (store code = en)
- English store view is set as default
- for both views i configured:
- Use Web Server Rewrites: yes
- Add Store Code to Urls: yes

Before, both urls https://webshop.com/en/ and https://webshop.com/en/ were routing perpectly to respective hope pages.

Currently, for some reason i get a 404 for both https://webshop.com/en/ and https://webshop.com/nl/

I checked a lot of settings and possible issues, but i'm kind of stuck....
One thing i want to understand, where is the routing for the store view homepages is done?
Are these added to the url_rewrite table or is this done on Apache/nginx level?
How are these changes triggered from admin panel config changes?
4 REPLIES 4

Re: Homepages routing issue (404)

Hi @infoelectr984e ,

 

Please review the settings across different store views and, in addition, verify whether the appropriate pages have been selected for the corresponding website or store view.

 

Configuration-Settings-Stores-Magento-Admin-04-28-2025_02_00_PM.png

Pages-Magento-Admin-04-28-2025_02_02_PM.png

 

Problem Solved? Accept as Solution!

 

Thanks

Ankit Jasani

Re: Homepages routing issue (404)

Hi Ankit,
Thanks for the reply, but I have already tried and checked all these obvious ones.
Do you know which system component handles the actual routing from the store-view URL to the homepage URL?  

Re: Homepages routing issue (404)

For anyone with the same issue where the store views result in a 404 but other shop pages work properly, my issue was the below entry in my .htaccess file, which routed the store view endpoints to index.php: 

############################################
## Rewrite everything else to index.php

RewriteRule .* index.php [L]



I fixed it to add the following rewrite exception for my storefront endpoints ( /nl/ and /en/)

############################################
# don’t rewrite our language roots
RewriteRule ^(nl|en)/?$ - [L]

Re: Homepages routing issue (404)

@infoelectr984e 

 

You may require to allow "Store code to Urls".

 

Configuration-Settings-Stores-Magento-Admin-07-20-2025_05_28_PM.png 

- rxraj