I have been testing some things and i can't understand why this piece of rules don't work:
- Code: Select all
RewriteRule ^(.*).htm $1.php
RewriteRule ^(.*)-(.*)-(.*).htm $1.php?$2=$3
RewriteRule ^(.*)-(.*)-(.*)-(.*)-(.*).htm $1.php?$2=$3&$4=$5
When i save the htaccess like the above, the only rule that works is the first. All the others give me errors.
So if i comment out the first line then the only one that works is the second one:
- Code: Select all
#RewriteRule ^(.*).htm $1.php
RewriteRule ^(.*)-(.*)-(.*).htm $1.php?$2=$3
RewriteRule ^(.*)-(.*)-(.*)-(.*)-(.*).htm $1.php?$2=$3&$4=$5
and so on. Only the first uncommented rule works.
Why is this happening and how can i work this out?
I hope i am not doing something stupid