Hello Mods,
I am very thankful to this forum as I have learned whole Apache Module of Rewrite from this forum.
Well, I have one question which I will think minimize some code and processing. I am asking for your suggestions mods and members as I have no idea that what is its purpose and exact usage in below code.
I have one code in my htaccess as below
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /[a-z0-9-]+.php\ HTTP/
RewriteRule ^([a-z0-9-]+)\.php$ http://www.example.com/$1/ [R=301,L]
The above code is working fine and redirecting any /xyz.php page to /xyz/ but my question is RewriteCond is matching URL with pattern, if pattern matches then RewriteRule will execute and with help of [R] flag it redirects.
I want to ask that what I want is just redirection so is RewriteRule with [R] flag is not enough for it? as same pattern I am using in RewriteCond is in RewriteRule and if I remove RewriteCond line my page is redirecting perfectly.
Please give your valuable suggestions MODs.
Waiting for replies.
Best Regards