Firstly, I switch to root account:
sudo su
Then I enable the rewrite module in Apache2 with:
a2enmod rewrite
I check to see if the module worked by running:
apache2ctl -M
If you see rewrite_module on the list, it's ok
Go to the folder /etc/apache2/sites-available/, and find the file which is named similarly to your website name (Ex: business.dev). If there's not such file, use the file named default.
Open the file by an editor and look for Directory code block which contains the path to your website, leave other Directory code blocks untouched. Change:
AllowOverride None to AllowOverride All
This action allows .htaccess files (like Drupal's) override the settings of Apache and makes URL Rewrite function work.
Restart Apache:
service apache2 restart
Restart Apache:
service apache2 restart
Done!

0 comments:
Post a Comment