How to Enable mod_rewrite in Apache
- Redoso
- General
- How to Enable mod_rewrite in Apache
This Page Contains information about How to Enable mod_rewrite in Apache By ed in category General with 1 Replies. [27], Last Updated: Sat Jun 01, 2024
ed
Wed Jun 10, 2009
1 Comments
53 Visits
How to Enable mod_rewrite in Apache Server
- Find the httpd.conf file (usually you will find it in a folder called conf, config or
something along those lines)
- Inside the httpd.conf file uncomment the line LoadModule rewrite_module
modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)
- Also find the line ClearModuleList is uncommented then find and make sure that the
line AddModule mod_rewrite.c is not commented out.
Check to see if mod_rewrite is enabled
There are several ways to check if its working, I will try to show you the simplest method,
Create a .htaccess file (a text file named .htaccess) with the following code in it
Options +FollowSymLinks
RewriteEngine On
Save the file to a subdirectory of your main site something like this
/rewrite-testfolder/.htaccess
Now attempt to browse to the subdirectory (http://localhost/rewrite-testfolder/). One of two
things could happen
- No errors
Congrats mod_rewrite engine is now enabled.
- 500, Internal Server Error
If you get this message then mod_rewrite was not installed/enabled on your computer.
https://www.redoso.com/11.html