-
Apache configuration file
- ubuntu -> /etc/apache2/apache2.conf
- arch -> /etc/httpd/conf/httpd.conf
-
Add mod_rewrite and .htaccess support for your site At the end of the configuration files add these lines:
#My site mod_rewrite configuration <Directory "/ABSOLUTE/PATH/YourSite"> AllowOverride All </Directory>
-
Enable mod_rewrite
- ubuntu:
sudo a2enmod rewrite
- arch: Uncomment, in apache configuration file, the line
LoadModule rewrite_module modules/mod_rewrite.so
- ubuntu:
-
Restart apache
- ubuntu:
sudo service apache2 restart
- arch:
sudo systemctl restart httpd
- ubuntu:
Last active
April 6, 2024 18:18
-
-
Save dario2994/9445587 to your computer and use it in GitHub Desktop.
Enable mod_rewrite in apache
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your solution also works for Manjaro as it is an Arch-based distro. Thanks :-)