-
Notifications
You must be signed in to change notification settings - Fork 39
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UX] Detect whether mod_rewrite is enabled (in Apache installs) and throw a warning in the clean URLs page. #1573
Comments
There can be quite a few reasons that this does not work. I've had a few of my own battles with this in drupal land in different environments.
|
Rookie mistake. Thanx @serundeputy |
...can we have it so that we detect this and have a warning in the clean URLs page so to give pointers to forgetful people like myself? |
Perhaps also have an entry with |
...the messages could be along the lines of:
|
I managed to put together this piece of code that works in detecting if mod_rewrite is present/enabled:
Hope it helps |
I've filed a PR at backdrop/backdrop#1230 , but there are some concerns. There is not a very reliable way to tell what web server an environment is using; http://serverfault.com/questions/164130/how-to-detect-in-php-if-it-is-running-on-apache-nginx-or-some-other-webserver There is no corresponding nginx_get_modules() function and apache_get_modules() apparently does not work for php as cgi users. Not sure if this is insurmountable or it is a better message for >80% of users or what. @quicksketch you have ideas, opinions or concerns on these issues? |
Ping @quicksketch |
This branch has conflicts that must be resolved. And there also seem to be some concerns regarding the approach (two messages with different types about the same thing). |
Here's the deal...
?q=admin/config/search/urls
to run the test. Test says "no go".?q=
part of the URL. ...404AllowOverride All
etc. in my apache settings and restart the service.admin/config/search/urls
and it works!!?q=admin/config/search/urls
page shows that "Clean URLs cannot be enabled." and running the test throws a "The clean URL test failed." message.admin/config/search/urls
...it works and gives me the option to enable clean URLs. WTF#1I repeat the tick and save a couple of times... still the checkbox comes as unchecked ...but the clean URLs work?!? ...well only if I manually type them in the address bar. If I visit the website still all menu links (in primary navigation for example) are using the non-clean form.
Something I'm doing wrong or bug?
The text was updated successfully, but these errors were encountered: