WordPress htaccess create virtual subdirectories

Currently I have the standard WordPress htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/folder/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/folder/index.php [L]
</IfModule>

# END WordPress

I need to use htaccess to create virtual subdirectories for languages, such as www.mysite.com/en, www.mysite.com/fr, www.mysite.com/fr/some-blog-post.php.

Read More

They only need to be virtual as I’m using localize.js to do the translating. I just need to be able to create these directories to set languages.

What’s the best way of accomplishing this? I’ve tried various ways of doing it using other answers but no one else seems to have done it.

Related posts

Leave a Reply