Htaccess - add parameter and redirect

Hi,
I have page without language parameter in url, but I would like to change it. I want to redirect all old urls. For example the longest url:
old url: http://www.(...).pl/oferty/mieszkania/pokaz/907912/
new url: http://www.(...).pl/pl/oferty/mieszkania/pokaz/907912/

I would like to redirect all regardless of length.

Thanks in advance for help.

ok, I’ve got solution:

RewriteCond %{REQUEST_URI} !^/(pl||en)/

RewriteRule ^(.*)$ pl/$1 [R]

2 Likes