I am new on this forum, donno how it goes here, hope made this thread in the right place in no plz don’t punish me).
I have a bug in my code, spent a few hours on that and can't find any solution hope somebody could give me a hand, I would really appreciate that.
Here is the deal
- Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# Rule One main.php?act=data&pic=pix1&set_lang=en -> data-pix1-en.htm
RewriteRule (.*)-(.*)-(.*)\.htm$ /main.php?act=$1&pic=$2&set_lang=$3
# Rule Two main.php?act=data&pic=pix1 -> data-pix1.htm
RewriteRule (.*)-(.*)\.htm$ /main.php?act=$1&pic=$2
# Rule Three main.php?act=data&set_lang=en -> data-en.htm
RewriteRule (.*)-(.*)\.htm$ /main.php?act=$1&set_lang=$2
# Rule Four main.php?act=data -> data.htm
RewriteRule (.*)\.htm$ /main.php?act=$1
With this code everything works Except for Rule number Three but if I will replace it with Rule number one it will work but Rule number one won't. I am confused and don't know where is the bug
Any advices are welcome
Thanks in advance