If I understand correctly, I need to put something in httpd.config
to enable mod_rewrite. If this is true, what do I need to put in httpd.conf
or apache.conf
? Please be OS specific.
htaccess file allows you to set up URL rewrite and redirection rules without changing Apache configuration file. To enable . htaccess file in Apache, look for <Directory /var/www/html> section and change the AllowOverride directive from None to All: . . .
Nope, mod_rewrite
is an Apache module and has nothing to do with PHP.
To activate the module, the following line in httpd.conf
needs to be active:
LoadModule rewrite_module modules/mod_rewrite.so
to see whether it is already active, try putting a .htaccess
file into a web directory containing the line
RewriteEngine on
if this works without throwing a 500 internal server error, and the .htaccess
file gets parsed, URL rewriting works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With