I read the Configure clean URL
It ask to add the code below into .htaccess file.
<Directory /var/www/example.com>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
/var/www/drupal is the directory where I copied all the Drupal files.
So the final code should I add into it is
<Directory /var/www/drupal>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
Is that right?
It says to use that in the configuration file. You can not use
<Directory>
directive inside.htaccess
. The very nature of.htaccess
is already per directory context. Remove the directive and only use the rewriterules. This is only for Drupal 6Drupal 7 or 8
Try to understand what the instructions have and you need to use the appropriate one for your install. The link you provide is pretty detailed info.