I accidentally deleted my .htaccess file. Before that I could just delete everything in the var and pub/static folder (except the .htaccess file of course) and just reload the page to see my CSS / LESS changes. Without the .htaccess file the stylings completely disappear. Now I always have to run the bin/magento setup:static-content:deploy command in order to see my changes which takes for ever. Is there any way I can re-setup the .htaccess file?
Asked
Active
Viewed 1.3k times
3
Dawesign
- 231
- 1
- 3
- 8
-
1You can download corresponding file from the official Magento 2 repository. – Siarhey Uchukhlebau Sep 17 '16 at 14:05
-
I was glad to help :) I will add the comment as the answer. – Siarhey Uchukhlebau Sep 17 '16 at 14:37
-
I marked it as correct :) – Dawesign Sep 17 '16 at 14:42
3 Answers
11
You can download corresponding file from the official Magento 2 repository. That will solve your problem.
Siarhey Uchukhlebau
- 15,957
- 11
- 54
- 83
1
You can find the .htaccess file from below path :
https://github.com/magento/magento2/tree/2.4-develop/pub/static
Hope it may help you!
Bhavesh Prajapati
- 913
- 9
- 31
0
- You can find the
.htaccessfile atmagento root/var - There is one more
.htaccessfile you can find inroot/directory named as.htaccess.sample
Get the file into your root directory.
Remove the cache and try.
Krishna ijjada
- 8,927
- 6
- 41
- 70