i m using XAMPP but i m not able to use .htaccess file at local host. i m trying so many times.. Online working good. but local host showing [The requested URL was n
Just had a similar issue
Resolved it by checking in httpd.conf
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All <--- make sure this is not set to "None"
It is worth bearing in mind I tried (from Mark's answer) the "put garbage in the .htaccess" which did give a server error - but even though it was being read, it wasn't being acted on due to no overrides allowed.
Edit the .htaccess file, so the first line reads 'Test.':
Test.
DirectoryIndex index.php index.html index.htm
...
In conf/extra/httpd-vhosts.conf, add the line AllowOverride All
for all the websites that you are having problem with
<VirtualHost example.site:80>
# rest of the stuff
<Directory "c:\Projects\example.site">
Require all granted
AllowOverride All <-----This line is required
</Directory>
</VirtualHost>