Set server DocumentRoot to Drupal folder
As mentioned by @leymannx you have to configure your server virtual host to use the drupal1
as the DocumentRoot.
<VirtualHost *:80>
...
DocumentRoot /path/to/drupal1/
<Directory /path/to/drupal1>
AllowOverride All
</Directory>
...
</VirtualHost>
RewriteBase on a shared host (in Drupal .htaccess
)
If you're on a shared host you won't have access to change DocumentRoot. Instead, you can adjust RewriteBase in Drupal .htaccess
file (or $base_url
in settings.php
).
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
RewriteBase /drupal1
/drupal1
folder. Normally there is an option somewhere in a hoster's settings panel. This is no specific Drupal question. So I'd say your hoster may answer this question as well.