Чистые URL-адреса / .htaccess
-
11-12-2019 - |
Вопрос
<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:
- Left click on the wamp server icon and go to the apache.
- Here sub menu will be opened, go to the apache modules and enable the rewrite_module.
- now restart wamp server and then check your site.
- 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?