Forums Drupal

How to Enable Clean URL's?

Subscribe to How to Enable Clean URL's? 8 post(s), 2 voice(s)

 
Avatar Ed 9 post(s)

I’ve been trying for days to enable the Drupal feature for “clean url’s”.

I’ve worked through the steps here: http://drupal.org/node/15365 with no success.

I’ve installed Bitnami here: C:\BitNami Drupal Stack

What are the steps to enable clean url’s?

 
Avatar antonio Administrator 447 post(s)

Hi Ed,

You just have to edit

C:\Bitnami Drupal Stack\apps\drupal\conf\drupal.conf

and change

AllowOverride None

to

AllowOverride All

Then, you can go (assuming your Apache is using port 8080) to http://localhost:8080/drupal/admin/settings/clean-urls and enable it.

We will think of releasing the next stack of Drupal with this change already done, happy new year!

 
Avatar Ed 9 post(s)

I uninstalled Bitnami, then reinstalled and tried the above steps.

It still isn’t working for me. Here’s what I did.

For this file: C:\Bitnami Drupal Stack\apps\drupal\conf\drupal.conf

The contents are changed to:

Alias /drupal/ “C:/BitNami Drupal Stack/apps/drupal/htdocs/”
Alias /drupal “C:/BitNami Drupal Stack/apps/drupal/htdocs”

<directory> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all
</directory>

This message appears when I visit the link http://localhost:8080/drupal/admin/settings/clean-urls: “unable to connect. Firefox can’t establish a connection to the server at localhost:8080”

I’m not sure how to determine if I am using port 8080. I don’t recall specifying the port when installing Bitnami.

Any other steps I should follow to enable clean url’s?

 
Avatar antonio Administrator 447 post(s)

I’m sorry, my mistake. 8080 is the default port used by BitNami stacks on Linux and OSX. On Windows, port 80 is used by default. The correct link would be

http://localhost/drupal/admin/settings/clean-urls

Bear in mind that you will need to restart Apache after modifying the configuration files, though!

 
Avatar Ed 9 post(s)

Thanks, but still no luck.

Here’s what I did.

I checked the config file to make sure that “AllowOverride” is set to “All”.

From Windows XP, I went to Start | Programs | Bitnami Drupal Stack Service | Stop Bitnami Stack Service

Next I logged into drupal here: http://d7kxtw81/

(the above two steps are equivalent to restarting Apache, right?)

Finally, I went here: http://localhost/drupal/admin/settings/clean-urls

I received the 404 error message:

Not Found

The requested URL /drupal/admin/settings/clean-urls was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.61 (Win32) PHP/5.2.5 Server at localhost Port 80

 
Avatar antonio Administrator 447 post(s)

Shame on me. I have just done it on Windows, you have to do some extra actions comparing to Linux:

  • Edit

C:\Bitnami Drupal Stack\apps\drupal\conf\drupal.conf

and change

AllowOverride None

to

AllowOverride All

  • Edit

C:\Bitnami Drupal Stack\apache2\conf\httpd.conf

and change

#LoadModule rewrite_module modules/mod_rewrite.so

to

LoadModule rewrite_module modules/mod_rewrite.so

  • Edit

C:\Bitnami Drupal Stack\apps\drupal\htdocs\.htaccess

and change

#RewriteBase /drupal

to

RewriteBase /drupal

  • Restart your server
 
Avatar Ed 9 post(s)

Thank you kind and mighty Bitnami Ninja. It works!

 
Avatar antonio Administrator 447 post(s)

You’re more than welcome. I have implemented the changes to make it possible to enable ‘Clean URLs’ out of the box, and we will release newer versions of Drupal tomorrow :)

Forums Drupal