Pregunta

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 ?

¿Fue útil?

Solución

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 .

Otros consejos

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>
  1. Left click on the wamp server and go to the apache.
  2. Here sub menu will be opened, go to the apache modules and enable the rewrite_module.
  3. Restart wamp server and then check your site.
  4. Enable clean url will now be active.

First, go to /etc/apache2/sites-available if use apache then open 000-default.conf with your favorite editor and add this command to that conf:

<Directory /var/www/html>
    AllowOverride All
</Directory>

at the end, type sudo service apache2 restart in terminal.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top