If you're using Apache , you should configure it in order to allow .htaccess files to be executed.
To do so, you can
Allowoverride
to All
(or other). See AllowOverride/etc/apache2/apache2.conf
(or /etc/apache2/httpd.conf
in some versions). In these files, there is a <Directory "/var/www/"
that points to your /var/www/ directory. Inside this Directory tag, you can set AllowOverride
to All
. Using this configuration, every site on your server will be allowed to use .htaccess.I recommend to use the Virtual Host that allows a easier and cleaner configuration.
Checkout the comment in .htaccess file, if it starts with // then change it to #
For me this solved the problem, I wish for you too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.