I have a multiple language website, that uses subdirectories from the root ('/en' for english and '/es' for spanish) for each specific language. Each redirect appends a get variable to the URL, and hides it using a 'P' flag for proxy. My current htaccess file for the spanish subfolder is:
Options +FollowSymlinks
RewriteEngine on
RewriteOptions MaxRedirects=10
RewriteBase /
RewriteRule ^(.*)\.html$ $1.php
RewriteRule ^(.*)$ http://www.domain.com/$1?l=es [P,R=301,L]
The problem is that I also want to append the 'www' to the domain if it was left off. The proxy redirect does not show the 'www.' Is it possible to place a rewriterule before that final one that will append the www, and then still process the final one?