How can the RewriteRule be modified to change the file extension from .htm to .php in the given example?
To change the file extension from .htm to .php using RewriteRule, we need to modify the regular expression pattern to match .htm files and then redirect them to the corresponding .php file. This can be achieved by using the following RewriteRule in the .htaccess file: ```apache RewriteEngine On RewriteRule ^(.+)\.htm$ $1.php [L] ``` This rule captures any request ending with .htm and redirects it to the same filename with the .php extension.
Keywords
Related Questions
- Are there any specific PHP libraries or tools that can help with implementing secure SOAP communication over HTTPS?
- How can arrays be checked for specific content in PHP using regular expressions?
- What best practices should be followed when integrating PHP scripts with chat bots for moderation purposes?