Last active
February 6, 2023 14:20
-
-
Save link2qaiser/43d6ab3dc33fc4523c7085e5520630ab to your computer and use it in GitHub Desktop.
enable mode rewrite ubuntu apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo a2enmod rewrite | |
and restart the apache | |
sudo service apache2 restart | |
To use mod_rewrite from within .htaccess files (which is a very common use case), edit the default VirtualHost with | |
sudo nano /etc/apache2/sites-available/000-default.conf | |
Below “DocumentRoot /var/www/html” add the following lines: | |
<Directory "/var/www/html"> | |
AllowOverride All | |
</Directory> | |
Restart the server again: | |
sudo service apache2 restart | |
------------------------- | |
sudo chmod 755 -R html && sudo chmod -R o+w html/storage && cd html && sudo php artisan cache:clear && sudo composer dump-autoload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment