I have just installed a Drupal 8 website using drush dl drupal-8 --select
.
I have rewrite issues because there is no .htaccess
in my root directory.
Where can I find the default .htaccess
file for Drupal 8?
If you download Drupal from here, there is the .htaccess file in main directory.
How do you downloaded Drupal source code?
I executed the command you quoted, and I got the following files. (I executed ls -alF
in the directory where Drupal 8.3.0 was copied from Drush.)
-rw-rw-rw- 1 kiamlaluno kiamlaluno 262 Apr 6 02:12 autoload.php
-rw-rw-rw- 1 kiamlaluno kiamlaluno 2309 Apr 6 02:12 composer.json
-rw-rw-rw- 1 kiamlaluno kiamlaluno 152480 Apr 6 02:12 composer.lock
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 6 02:12 core/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 1025 Apr 6 02:12 .csslintrc
-rw-rw-rw- 1 kiamlaluno kiamlaluno 350 Apr 6 02:12 .editorconfig
-rw-rw-rw- 1 kiamlaluno kiamlaluno 206 Apr 6 02:12 .eslintignore
-rw-rw-rw- 1 kiamlaluno kiamlaluno 41 Apr 6 02:12 .eslintrc.json
-rw-rw-rw- 1 kiamlaluno kiamlaluno 1346 Apr 6 02:12 example.gitignore
-rw-rw-rw- 1 kiamlaluno kiamlaluno 3671 Apr 6 02:12 .gitattributes
-rw-rw-rw- 1 kiamlaluno kiamlaluno 7866 Apr 6 02:12 .htaccess
-rw-rw-rw- 1 kiamlaluno kiamlaluno 549 Apr 6 02:12 index.php
-rw-rw-rw- 1 kiamlaluno kiamlaluno 18092 Nov 17 00:57 LICENSE.txt
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 6 02:12 modules/
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 6 02:12 profiles/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 5889 Apr 6 02:12 README.txt
-rw-rw-rw- 1 kiamlaluno kiamlaluno 1596 Apr 6 02:12 robots.txt
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 6 02:12 sites/
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 6 02:12 themes/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 848 Apr 6 02:12 update.php
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 6 02:38 vendor/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 4555 Apr 6 02:12 web.config
If you don't see .htaccess it is because files starting with a dot are normally considered hidden, and the CLI doesn't normally show those files, except when telling the command to show all the files.
Alternatively, you could run composer create-project drupal/drupal your_site_directory 8.3.*@dev --no-dev
if you have Composer installed, which copies the following files/directories.
-rw-rw-rw- 1 kiamlaluno kiamlaluno 262 Apr 14 11:34 autoload.php
-rw-rw-rw- 1 kiamlaluno kiamlaluno 2247 Apr 14 11:34 composer.json
-rw-rw-rw- 1 kiamlaluno kiamlaluno 152480 Apr 14 11:34 composer.lock
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 14 11:35 core/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 1025 Apr 14 11:34 .csslintrc
-rw-rw-rw- 1 kiamlaluno kiamlaluno 350 Apr 14 11:34 .editorconfig
-rw-rw-rw- 1 kiamlaluno kiamlaluno 206 Apr 14 11:34 .eslintignore
-rw-rw-rw- 1 kiamlaluno kiamlaluno 41 Apr 14 11:34 .eslintrc.json
-rw-rw-rw- 1 kiamlaluno kiamlaluno 1346 Apr 14 11:35 example.gitignore
-rw-rw-rw- 1 kiamlaluno kiamlaluno 3671 Apr 14 11:34 .gitattributes
-rw-rw-rw- 1 kiamlaluno kiamlaluno 7866 Apr 14 11:34 .htaccess
-rw-rw-rw- 1 kiamlaluno kiamlaluno 549 Apr 14 11:35 index.php
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 14 11:35 modules/
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 14 11:35 profiles/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 5889 Apr 14 11:34 README.txt
-rw-rw-rw- 1 kiamlaluno kiamlaluno 1596 Apr 14 11:35 robots.txt
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 14 11:35 sites/
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 14 11:35 themes/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 848 Apr 14 11:35 update.php
drwxrwxrwx 0 kiamlaluno kiamlaluno 0 Apr 14 11:36 vendor/
-rw-rw-rw- 1 kiamlaluno kiamlaluno 4555 Apr 14 11:35 web.config
In both the cases, the .htaccess file is copied.