Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 23288  / 3 Years ago, sun, september 5, 2021, 3:28:01

I'm having a problem with an .htaccess file on a newly installed Ubuntu server running Apache2.



The .htaccess file in the directory where the WordPress files are located isn't being take into account when the server loads pages. There isn't an AllowOverride statement in the apache2.conf file, but the default is All, and it doesn't change anything if I include one.



I've tried including the contents of the local .htaccess file in a section. I've also tried this:



<Directory /var/www/mydomain.com/html>
AllowOverride All
</Directory>


I also tried changing all instances of AllowOverride in /etc/apache2/sites-available/default (which are all set to Noneby default) to All.



But I've had no luck.



Not sure how to solve this one.


More From » apache2

 Answers
1

This sounds like mod_rewrite isn't enabled. Try running the following:



a2enmod rewrite


If the command reports back that rewrite has been enabled, restart Apache with sudo service apache2 restart if it says that it's already enabled, then this isn't the answer :)


[#41547] Sunday, September 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
farnic

Total Points: 409
Total Questions: 117
Total Answers: 125

Location: Andorra
Member since Sat, May 27, 2023
1 Year ago
;