Mod Rewrite Not Working
I searched for a solution to my problem of Mod Rewrite Not Working and the advice was rather obvious such as to make sure you remove the hash (#) symbol before the mod rewrite extension inclusion line in Apache httpd.conf where you see LoadModule rewrite_module modules/mod_rewrite.so
But what solved it for me was recognizing that the default setting for any directory on the server is for a very restrictive set of services.
The actual text is:
# First, we configure the “default” to be a very restrictive set of
# features.
Given that the httpd.conf is very well commented, it does make sense to take the time to read all of the comments before you hit the web and start going down rabbit holes seeking answers to why your .htaccess is not working etc.
A crucial directive is:
AllowOverride None
This is the cause of .htaccess rules being ignored.
So in your root document directory settings,
# 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
AllowOverride All
So do this and restart the Apache server and your Mod Rewrite should work just fine to get the fancy URLs etc.


Recent Comments