By AlanQ on
Having installed Drupal7.14 on a local Ubuntu 12.04 LAMP server,
I found that the Clean URLs page was showing "The clean URL test failed."
Following instructions at Clean URLs
I have enabled mod-rewrite
sudo a2enmod rewrite
I have added
<Directory /usr/share/drupal7>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>to /etc/apache2/httpd.conf
And I have restarted apache
sudo service apache2 restart
I still get, "The clean URL test failed."
Help.
Comments
you have to modify the
you have to modify the virtualhost in httpd.conf
change this line AllowOverride None to AllowOverride All
sudo nano /etc/apache2/sites-available/default
Still not working...
Thank you drupal_cañetano and leon.vandergrient but still no joy.
On Ubuntu, Drupal 7 is installed in
/usr/share/drupal7//etc/apache2/conf.d/drupal7.confcontainswhich 'redirects' requests so that I see my Drupal index.php page when I point my browser to
http://192.168.0.5/drupal7/In
/usr/share/drupal7/I have the default.htaccessfile which includes, among other thingsIn
/etc/apache2/mods-enabled/I havelrwxrwxrwx 1 root root 30 May 11 21:59 rewrite.load -> ../mods-available/rewrite.loadIn
/etc/apache2/there are two configuration files:apache2.conf(default content) andhttpd.confhttpd.confwas originally empty, but now contains:And with all that, I still get 'The clean URL test failed.' when I point my browser at http://192.168.0.5/drupal7/#overlay=%3Fq%3Dadmin/config/search/clean-urls
Any other ideas much appreciated.
Thanks, Alan
Change base
Try
RewriteBase /drupal7[SOLVED]
Yes! Brilliant!
Adding
RewriteBase /drupal7to.htaccessin/usr/share/drupal7did the trick.I followed it with
sudo /etc/init.d/apache2 force-reloadfollowed bysudo /etc/init.d/apache2 restart.Then, when I reloading the clean URLs page, I got a checkbox to 'Enable clean URLs'.
Thank you, Leon.
My similar solution
Hello Leon and Alan,
This post really helped me. I have a slightly different setup though and thought I'd share what I did to make clean URLs work in Drupal 7.14., uBUNTU 12.04, Apache 2
I'm on a dedicated server so I added the text
RewriteEngine on
RewriteBase /drupal
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
to the httpd.conf file AFTER
enabling the rewrite_module (shared) via the same method
I then followed with the force-reload and apache2 restart commands
I was then able to check use clean URLs in Drupal 7
Leon, it was your suggestion about
RewriteBase /drupal
that was the key for me. my initial info lacked the /drupal part, which is where my install is located. thanks to both of you for a helpful post!
This was all I had to change...
Only had to change AllowOverride to All in the section of /etc/httpd/conf/httpd.conf to get Clean URLs running.
My own Directory (aka DocumentRoot) was /var/www/html which is where I'd installed Drupal, sdramos post used /var/www, that could change for you too depending on where you installed Drupal. The key is to allow .htaccess to be used for the correct directory from within httpd.conf which may need some poking around if you have more complicated directories e.g. sub-sites.
Here's my blog post showing the process I followed and a few things I checked out along the way.
Thanks all especially sdramos for your helpful posts.
Try changing AllowOverride
Try changing the value of
AllowOverridefromNonetoAllinapache.confyour virtual server (haven't used Apache in a while).and putting the
.htaccessfile in the Drupal root directory. If this works, you know that it has to do with yourhttpd.conf. If it is still not working it has to be something else.Clean URL Bug
If you are using drupal 7,then there is no need to edit the .htaccess file because clean url is enabled by default.
So here's the trick,if the clean url test fails on drupal 7.You will have to edit the url.
Your url at the clean url page should be;
http://www.your-site.com/?q=admin/config/search/clean-urls
So edit it and change it to;
http://www.your-site.com/admin/config/search/clean-urls
Now you should see the enable clean url button.Enable it and get yourself a cup of coffee.
Hope that does the trick.
See my reply below if you still have issues.Following this method works 99.9% of time.
Cheers.
Timesaver
I've been spending hours on getting the clean urls to work. This did the trick. THANK YOU.
excellent trick
Worked like a charm!
guys guys go ahead with this ..
EDIT
To follow my solution above,please disable overlay in core modules.That way we ll have the same url.
If you re working on a local server,simply enable apache rewrite module(wamp icon>Apache>Apache modules) and restart Wamp.Then go back and enable clean url.
Cheers
Enable clean URLs
If you re working on a local server,simply enable apache rewrite module(wamp icon>Apache>Apache modules) and restart Wamp.Then go back and enable clean url.
Excellent - yup this works, thanks.
it works....
Thanx sir for your help
The Solution that Works!
Thank you for turning an otherwise complicated procedure into something relatively simple. I owe you one.
You, sir, saved my life!
You, sir, saved my life! After so many tricks, this is the one that set my site in motion!
:D
This worked! :D
Thanks!
You sir are a scholar and a gentleman. This workaround worked like a charm!
Thank you
I can't believe it was so simple as removing the ?q= from the url. I wish you a very Merry Christmas doncheks
The Solution
Worked like a charm!
This solved my issue... :)
This solved my issue... :)
Haha crazy bug
Thanks donchecks that was just what I needed!
It works
Thank you guy. I had spend amounts of time to get this to work, but in vain. You rock.
I had all of the configs
I had all of the configs correct, but somehow i overlooked this,. the simplest of settings.
Thanks!
404 Not Found
For some reason when I change my URL I get a 404 error. Are you sure that there isn't a need to edit the .htaccess file? My file has only one line, and I'm not sure why but I feel as if it may be the cause of the 404 error when I change the URL.
Worked like charm!! Saved
Worked like charm!! Saved time :)
Thank You,
Shashwat Purav
Clean URLS UBUNTU
Well I strugled on this and wwas about to post when it came right
here is what I did
Then restart the server
sudo /etc/init.d/apache2 force-reload
sudo /etc/init.d/apache2 restart
I THEN GOT SOME ERRORS - but at least there where errors that I could navigate too and fix.
I think I removed the RewriteBase /drupal7 in the htacess in mysite directory
That took a while and in my excitement I forgot the last couple of steps but it really was the HOSTS file that messed me up.
still stuck
On CentOs 6.3 where not using .htaccess and using instead mysubname.conf in /etc/httpd/conf.d included in httpd.conf
On login the url directs to /?=admin/config/search/clean-urls and test fails but if change directory in url bar to
/admin/config/search/clean-urls the checkbox appears but when checked it doesn't save checked.
Below is the mysubname.conf which is basically everything in the .htaccess file plus virtualhost directory.
index.php rewite rule in .htaccess
Well I've just spent about 24 hrs hacking away and tried petty much everything above. Finally I find a solution to modify the index.php rewrite rule in .htaccess as such:
RewriteRule ^(.+)$ /index.php/$1 [NC,L,QSA]
See here for more info:
http://www.andrew-kirkpatrick.com/2012/06/apache-virtualhost-htaccess-is...
doesn't work
@roblog that code didn't work for me.
httpS
I just had this problem at localhost. Despite i had activated Clean URLs yesterday. And it is easy to overlook it, and lose hours on that problem. To skip unnecessary tweaking htaccess/LAMP/XAMPP/Etc, remove "s" from https.
This works for me
I have an Ubuntu Server installation, and I have enabled clean urls following these steps:
http://www.open-craft.com/blog/enabling-clean-urls-drupal-clean-ubuntu
It works perfectly!
It was working fine !
Only these two steps fixed this issue :)
Correct for Ubuntu 12.04
Correct for Ubuntu 12.04. Thanks.
this is how it should be
this is how it should be enabled:
don't forget to
methoad works fine for me..
methoad works fine for me..
apache2.conf funcionando
Pego lo agregado a apache2. Funcionó a partir de agregar AllowOverride All
Enable clean URL Drupal7
Enable mod-rewrite :
sudo a2enmod rewriteOpen the file
sudo vi /etc/apache2/sites-available/000-default.confAdd these lines inside
VirtualHost *:80tag :Don't forget to restart apache2.
sudo service apache2 restartfor debian fork for me below
for debian work for me below solution
I edit /etc/apache2/sites-available/000-default.conf
and insert
between
<VirtualHost *:80>and</VirtualHost>then run
/etc/init.d/apache2 reload
and last run
/etc/init.d/apache2 restart
Hi Namjoo,
Hi Namjoo,
Thanks a lot, for me these was the only thing that worked.
Anisorf
How to enable Clean URLs ?
I am using a shared hosting and a CPANEL. Where do I edit the clean URL? I have disabled the overlay module too but still the test fails.
Verify if your site is not on Maintenance Mode
Hi,
If you deactivate your Clean URL configuration and try to set back the Clean URL you will get this error if your site is on Maintenance Mode.
Put the site in live mode and set up the Clean URL again.
Flavio
Nginx
[redacted]