Вопрос

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA
.

Ищете обратную связь

Цель: Я пытаюсь включить «чистые URL» на площадке Drupal 7 (такой, что example.com/?q=USER разрешит на image.com/user).

Я просто провел слишком долго, проливая официальные документы и комментарии, безрезультатно, поэтому любые предложения очень ценятся!

Я проверил коробку «Включить чистые URL» в Drupal (/ admin / config / search / clean-url) и получила все-то, что параметры конфигурации были сохранены.Итак, теперь я действительно могу перейти к example.com/user, и он действительно отображает тот же контент, что и example.com/?q=user.Однако то, что я хочу, например, для Example.com/?q=USER, чтобы переписать на URI как example.com/user.

Соответствующий код .htaccess отображается выше, и мой Apache Cont, кажется, правильно настроен.

Это было полезно?

Решение

Clean urls do indeed work but I kept getting errors until I found this This saved my sanity:

  • disable Overlay module
  • go to Clean URLS
  • change URL from: /?q=admin/config/search/clean-urls
  • to: /admin/config/search/clean-urls
  • Then the Check box should appear

Другие советы

I was searching for this issue, the solution that work for me was that:

  1. Left click on the wamp server icon and go to the apache.
  2. Here sub menu will be opened, go to the apache modules and enable the rewrite_module.
  3. now restart wamp server and then check your site.
  4. Enable clean url will now be active.

there should be a closing bracket on your last line "]". Perhaps this is the source of your frustration?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top