How I can force enable clean url d7 Today i have transferred my d7 site to a new ubuntu vps, then in the Apache config files i made this change: AllowOverride None to AllowOverride All and now d7 site is working under clean url.

While transferring the website i have disabled the clean url option from the admin/config/search/clean-urls, but here is the difficulty. Now clean url works but in order to enable clean url when i click on the "Run the clean URL test" button then it shows "The clean URL test failed." though it is working :/

I have cleared all the cache data with no luck. 

Now what are alternative ways to enable clean url manually in d7?
Clean URL state is managed through the Drupal variable clean_url. 


clean url disabled: clean_url is 0
clean url enabled: clean_url is 1


You can force this value by:


Using drush

drush vset clean_url 1

Using a direct SQL query

UPDATE variable SET value=1 WHERE name='clean_url';

Force a value in settings.php

$conf['clean_url'] = 1;