Forum Moderators: phranque
site.com/file.txt
site.com/jp/file.txt
site.com/es/file.txt
site.com/another_file.txt
site.com/jp/another_file.txt
site.com/es/another_file.txt
site.com/third_file.txt
site.com/jp/third_file.txt
site.com/es/third_file.txt site.com/file.txt - for english (the only language that does not have a subdirectory)
site.com/jp/anoter_file.txt - for japaneese
site.com/es/third_file.txt - for Spanish. RewriteRule ^de/another_file.txt - [R=404]
RewriteRule ^fr/another_file.txt - [R=404]
RewriteRule ^es/another_file.txt - [R=404] RewriteRule ^(?!jp)../another_file.txt - [R=404] site.com/fr/another_file.txt - 404 error as expected
site.com/es/another_file.txt - 404 error as expected site.com/another_file.txt - opens the file - not expected. RewriteRule ^(?!jp)../another_file.txt - [R=404]
RewriteCond $1 !=jp
RewriteRule ^(?:([^/]+)/)?another_file\.txt$ - [R=404] It would be helpful if you could show an example of your public www filesystem, and if you could show the current rewrite rules you have in place.
RewriteRule ^(jp|cz|ru|ua|de|fr|it|es|br|cn)\/(.*)$ $2 (this is the only rule in the .htaccess). RewriteRule ^(?!jp)../another_file.txt - [R=404]