Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
I'm using xampp Linux under ubuntu and I want to use .htaccess in my local server the server keep giving me the404 error page I tried to modify the config file of apache httpd.conf but still te same problem httpd.conf - <Directory "/opt/lampp/apache2/htdocs"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> LoadModule rewrite_module modules/mod_rewrite.so - any help ?? thanks in advance
For some reason my install of XAMPP didn’t have mod_rewrite automatically enabled? Not really sure why but basically below are the instructions on how to enable .htaccess mod_rewrite in xampp.
1. Go to the directory of installation <C:\xampp>\apache\conf
2. Open and edit httpd.conf in a text editor
3. Find the line which contains
and (uncomment) change to
4. Find all occurrences of
and change to
I think it appears2 or3 times on the configuration file.
5. Restart xampp
That’s it you should be good to go.
To enable it the rewrite module, run "apache2 enable module rewrite":
sudo a2enmod rewriteYou need to restart the webserver to apply the changes:
sudo service apache2 restartIf you plan on using mod_rewrite in .htaccess files, you also need to enable the use of .htaccessfiles by changing AllowOverride None to AllowOverride FileInfo. For the default website, edit /etc/apache2/sites-available/default:
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews # changed from None to FileInfo AllowOverride FileInfo Order allow,deny allow from all </Directory>After such a change, you need to restart Apache again.