Mod_Rewrite Activation Across Operating Systems
Unlike PHP, mod_rewrite is an inherent component of Apache. To enable this module, locate either the httpd.conf or apache.conf file in your Apache configuration directory and ensure the following line is included:
LoadModule rewrite_module modules/mod_rewrite.so
To verify the module's activation, create an .htaccess file in a web directory with the following line:
RewriteEngine on
If this file parses without triggering a 500 internal server error, mod_rewrite is functioning properly and URL rewriting is enabled.
The above is the detailed content of How to Activate Mod_Rewrite in Different Operating Systems?. For more information, please follow other related articles on the PHP Chinese website!