I had a rewrite rule that rewrote index.htm to index.php. Worked like a charm but looking back on it I wanted them both to be redirected to
I did this using the following code I found using Google:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.htm\ HTTP/
RewriteRule ^index\.htm$ [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ [R=301,L]
Now I tested this and it seems to be working just fine. However I have no idea what the above code means, as it wasnt explained on the page I found it.
I'm specificly wondering about the fact that there's "[A-Z]{3,9}" before index.htm, what does this do and why is it in front of index.htm? Could someone explain the (whole) code for me?
I did this using the following code I found using Google:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.htm\ HTTP/
RewriteRule ^index\.htm$ [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ [R=301,L]
Now I tested this and it seems to be working just fine. However I have no idea what the above code means, as it wasnt explained on the page I found it.
I'm specificly wondering about the fact that there's "[A-Z]{3,9}" before index.htm, what does this do and why is it in front of index.htm? Could someone explain the (whole) code for me?