Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clean urls not working in Drupal 7 [closed]

I just installed and started using Drupal 7, and I followed the instructions to turn on Clean Urls. I clicked "Run the Clean URL test" button, but it failed to return any results. It loads up something and then refreshes the page.

Can anyone shed light on why this is happening and what I can do?

like image 926
picardo Avatar asked Jul 17 '11 20:07

picardo


People also ask

Does Drupal enable search engine friendly URLs True or false?

By default, Drupal comes with the “Path” module already installed and activated. This add-on is what controls setting up search friendly URLs in Drupal. If you want to make sure this module is installed, click “Extend” in the top tool bar and scroll down to “Path.” Make sure it has a check mark next to its name.

Where is htaccess file Drupal?

htaccess file can be found at installdir/APPNAME/. htaccess. Some applications do not have the installdir/apache2/conf/vhosts/htaccess/APPNAME-htaccess.


2 Answers

your apache config file (/etc/apache2/apache2.conf) must have the following 2 lines in it. If not then add them. This tells apache to look for a .htaccess file for settings in the folder “/var/www/drupal”

<Directory /var/www/drupal>
  AllowOverride All
</Directory>
AccessFileName .htaccess
like image 74
Kshitiz Singh Avatar answered Sep 29 '22 11:09

Kshitiz Singh


Create file phpinfo.php, contents: <?php phpinfo();?> Then load it through your browser. Find text 'Loaded Modules', it should contain 'mod_rewrite'. If no, enable it in your apache configuration (you may ask how if so).

like image 44
Alex Smirnoff Avatar answered Sep 29 '22 11:09

Alex Smirnoff