The clean URL test failed Drupal and Openshift I want to clean URL in Drupal but get the test failed, and that what I have done in my httpd.conf :

&lt;Directory "/php/"&gt;
 RewriteEngine on
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
&lt;/Directory&gt;


I have also enabled the mod_rewrite but got an error! Any idea?
It's a little hard to answer your question without knowing your setup, e.g. operating system, drupal version and the location, where your site is hosted (are you trying to view it on localhost or on a remote host?).

If you are running Drupal 7, clean urls should be enabled by default.
So, maybe the following does help:

If the url you are accessing is

http://www.your-site.com/?q=admin/config/search/clean-urls


change it to

http://www.your-site.com/admin/config/search/clean-urls


... and test again. Does it still fail?

source:  https://drupal.org/node/1572984#comment-6751806