I have a Wordpress blog that has posts in English and dynamic Spanish translations that via permalink have an /es/ directory extension: English: http://site.com/ Spanish: http://site.com/es/ Is there a way to use .htaccess to always redirect to the /es/ pages? In other words, when someone typed in www.site.com they go to www.site.com/es/. The variations I've tried have all created endless loops. Thanks
This? Although this prevent access to the English version! RewriteEngine On RewriteBase / RewriteRule !^es/ es%{REQUEST_URI} [R=301,L] I think this is best handled in a server side script.
RedirectMatch permanent ^(slash)index.php$ http(colon)(slash)(slash)site.com(slash)es Replace (slash) with / Where index.php is the index file outside your es directory. It can be anything index.htm , index.html etc..