Enabling clean URLs (Drupal 7)
11,882
Solution 1
Open your .htaccess file in your project root.
Uncomment RewriteBase /drupal
and change it to your project name like RewriteBase /myprojectname
.
Comment RewriteBase /
Goto /admin/config/search/clean-urls
There will be an option to Enable clean URLs .
Solution 2
For Ubuntu Server 13.04
sudo a2enmod rewrite
sudo vi /etc/apache2/sites-enabled/default
If there is no such file, try this one: /etc/apache2/sites-enabled/000-default
Change (line 7 and line 11), "AllowOverride None" to "AllowOverride All".
Save and exit.
Restart Apache
sudo /etc/init.d/apache2 restart
If you are working with apache version 2.4 add below code in /etc/apache2/sites-available/000-default.conf file.
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Solution 3
- Left click on the wamp server and go to the apache.
- Here sub menu will be opened, go to the apache modules and enable the rewrite_module.
- Restart wamp server and then check your site.
- Enable clean url will now be active.
Comments
-
Rohi almost 2 years
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. There is no option to enable clean url as said in the instructions. Can somebody help ?