laster
Goto Top

Clean URL in Drupal funktionieren nicht

Hallo,

habe einen Ubuntu-Server (Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-131-generic x86_64)) mit installiertem Apache/2.4.18 und Drupal 7 .
Ich stelle 'nur' den Server bereit, ein DL hat Drupal und die Webseite eingerichtet.
Alles läuft soweit.

Nun gibt es nur noch Probleme mit den Clean URLs.

Im Quelltext der HTML-Seite(n) steht statt
<li class="leaf menu-mlid-123"><a href="/aktuelles">Aktuelles</a></li>  
leider
<li class="last leaf menu-mlid-123"><a href="/?q=aktuelles">Aktuelles</a></li>  
leider habe ich noch nicht herausgefunden, wo das Problem liegt. In der Drupal-Verwaltung ist unter "Startseite > Administration > Konfiguration > Suche und Metadaten" die Option "Lesbare URLs aktivieren" aktiv.
Die .htaccess funktioniert auch (wird verwendet und gelesen).
Das rewrite Modul ist aktiv.

Der DL meint, es lieht am 'Unterbau', also Apache Konfiguration. Leider weiß ich nicht, was da noch eingestellt werden muss.

vG
LS

Content-Key: 381978

Url: https://administrator.de/contentid/381978

Printed on: April 25, 2024 at 03:04 o'clock

Mitglied: 129580
129580 Aug 01, 2018 updated at 14:34:06 (UTC)
Goto Top
Hallo,

wie sieht denn dein vhost aus? Hast du das so eingerichtet, wie vom Hersteller beschrieben?

Siehe:
https://www.drupal.org/docs/7/configuring-clean-urls/enable-clean-urls

VG
Exception
Member: laster
laster Aug 01, 2018 at 14:45:17 (UTC)
Goto Top
Hallo,

hier die /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
  ServerName www.xyz123.de
  Redirect permanent / https://www.xyz123.de/
  ServerAdmin website@xyz123.de
  DocumentRoot /var/www/html
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  <Directory /var/www/html>
    AllowOverride All
  </Directory>
</VirtualHost>
Mitglied: 129580
Solution 129580 Aug 02, 2018 updated at 07:46:33 (UTC)
Goto Top
Hi,

hm okay. Dein vhost ist in Ordnung. Hast du den Clean-Urls Test nach der Dokumentation durchgeführt?
Möglicherweise funktionieren die Clean URLs bereits aber Drupal rendert die HTML Dateien falsch.

Siehe dazu auch diesen Hinweis in der Dokumentation:

Note for Drupal 7
Sometimes, weirdly even after enabling and configuring all the required server configurations on your server, it keeps giving you the "Clean URL >test > failed" message and the checkbox to enable it, is not shown.

After carefully checking for each of the configuration mentioned in the above doc, if the same error message still persists, try removing the ?q=
from the url
[your-site-url]/?q=admin/config/search/clean-urls
and make it as
[your-site-url]/admin/config/search/clean-urls and hit enter. If all your server configurations were correct, you will be seeing the checkbox to >enable > Clean URLs again.

Schon mal ausprobiert?

VG
Exception
Member: laster
laster Aug 02, 2018 updated at 08:26:24 (UTC)
Goto Top
Hallo Exception,

Wahnsinn, das ist die Lösung gewesen.
Der DL (als Drupal-Experte) hat nicht schlecht gestaunt.
Ich bin beruhigt, dass der 'Unterbau' OK ist, hatte schon gezweifelt ...

schönen Tag noch
LS