Making sure .htaccess files work


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #By default all files under /var/www ignore the .htaccess file
  2. #To solve this, change /etc/apache2/site-available/default
  3. #sudo nano /etc/apache2/sites-available/default
  4.  
  5. #You see something like this
  6. <Directory /var/www/>
  7. Option Indexes FollowSymLinks MultiViews
  8. AllowOverride None
  9. Order allow, deny
  10. allow from all
  11. </Directory>
  12.  
  13. #Change to this:
  14.  
  15. <Directory /var/www/>
  16. Option Indexes FollowSymLinks MultiViews
  17. AllowOverride All
  18. Order allow, deny
  19. allow from all
  20. </Directory>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.