Enable mod_rewrite
1. Change httpd configuration file
# vi httpd.conf –/etc/httpd/conf/httpd.conf
Change ‘AllowOverride None’ to ‘AllowOverride All’
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride All
2. Uncomment rewrite module
LoadModule rewrite_module modules/mod_rewrite.so
3. Restart apache
# service httpd restart
4. Test the configuration
Create a .htaccess file and added following lines:
Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://www.inprose.com
5. Navigate to host website
If rewrite is working, the http://www.example.com would have no any parameters such as “index.php?id=idnum”.
Categories: apache
Comments (0)
Trackbacks (0)
Leave a comment
Trackback