I have a website in multiple languages, English pages are in the root, but each language is within its own subfolder and all home pages are titled index.html. I want to know if it’s possible to redirect any error 404 to the index.html within the current directory a visitor is in rather than defaulting back to the root index.html?
I believe some redirect code within the .htaccess file can do this for a single entry yet unsure about multiple entries, so I thought best to ask the experts. What say the experts to this conundrum?
Just note that the list of language directories needs to be specified (mod_rewrite is not psychic) so it can be used in the redirection; also, do NOT specify a filename in the RewriteRule’s regex because it’s a 404 request!
What a star you are but before I get too excited I just want to check something?I didn’t realise you could have more than one .htaccess file, so I just need to place an edited copy into each language sub-folder and change {subdirectory name} to match the folder name?