Hello,
I'm trying to create a rule that will rewrite URLs ending with "?language=gr" to a "/gr/" directory.
For Example:
1. domain.com/?language=gr to domain.com/gr/
2. domain.com/computers.php?language=gr to domain.com/gr/computers.php
3. domain.com/laptop/?language=gr to domain.com/gr/laptop/
4. domain.com/laptop/hp.php?language=gr to domain.com/gr/laptop/hp.php
I have created the following rule which works as i want to, except when it is in directories...
RewriteRule ^gr/([^/]*)$ ./$1?language=gr [L]
Working - domain.com/gr/
Working - domain.com/gr/computers.php
Not Working - domain.com/gr/laptop/netbooks/
Not Working - domain.com/gr/laptop/netbooks/hp.php
Thanks in advance.