Pulire gli URL / .htaccess
-
11-12-2019 - |
Domanda
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA
.
Alla ricerca di feedback
Obiettivo: sto cercando di abilitare "URL puliti" su un sito Drupal 7 (tale che questo example.com/?q=User si risolve in Example.com/User).
Ho appena trascorso troppo a lungo versare attraverso Documenti e commenti di Drupal ufficiali, senza alcun risultato, quindi qualsiasi suggerimento è molto apprezzato!
Ho controllato la casella "Abilita URL pulito" in Drupal (/ admin / config / search / clean-urls) e ha ottenuto il tutto chiaro che le opzioni di configurazione sono state salvate.Quindi ora sono in grado di andare in esempio.com/user e visualizza in effetti lo stesso contenuto di Esempio Example.com/?q=User.Quello che voglio, tuttavia, è per esempio.com/?q=User per essere riscritto nell'Uri come example.com/User.
Il codice .Htaccess pertinente viene mostrato sopra e il mio Apache Conf sembra essere configurato correttamente.
Soluzione
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
Altri suggerimenti
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?