Clean URLS/.htaccess
-
11-12-2019 - |
Question
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA
Looking for feedback
Goal: I am trying to enable "Clean URLs" on a Drupal 7 site (such that example.com/?q=user resolves to example.com/user).
I've just spent way too long pouring through official Drupal docs and comments, to no avail, so any suggestions are greatly appreciated!
I have checked the box "Enable Clean URLs" in Drupal (/admin/config/search/clean-urls) and got the all-clear that the configuration options were saved. So now I am actually able to go to example.com/user and it does indeed display the same content as example.com/?q=user. What I want, however, is for example.com/?q=user to be rewritten in the URI as example.com/user.
The relevant .htaccess code is shown above, and my Apache conf appears to be properly configured.
Solution
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
OTHER TIPS
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?