How do I enable clean URLs?

jhsu802701's picture

The clean URLs feature isn't working on my web site (http://www.dopplervalueinvesting.com). When I log into my admin page and go to Configuration -> Clean URLs, I get the button for running the clean URL test and the following error message:

Use URLs like example.com/user instead of example.com/?q=user.
Clean URLs cannot be enabled. If you are directed to this page or to a Page not found (404) error after testing for clean URLs, see the online handbook.

Also, the clean URL test fails.

When I go to http://example.com/?q=admin/settings/clean-urls/ (with "example" and "admin" replaced with the appropriate values), I see the list of admin tasks (dashboard, content, structure, appearance, people, modules, configuration, reports, help).

When I eliminate the "?q=" from the above URL, I get a 404 not found error.

According to what I've read, I need to set up my .htaccess file. Exactly what do I need to put in? The default .htaccess file in the public_html directory is:

The following disables the display of a file

index of a folder if there is no index found

such as index.html, index.php, etc...

Options -Indexes

If you wish to change a PHP Setting you need

to do it here and it will affect the folder

that this file is located in as well as all

sub-folders unless the sub-folder has it's

own .htaccess

#

As an example to turn the PHP Setting

"magic_quotes_gpc" on you would uncomment

the following line:

php_flag magic_quotes_gpc on

#

To set a value that is not on/off you need

to use the php_value setting in the following

format:

php_value setting_to_change = value

#

If you have any questions please contact

support at support@mddhosting.com

Comments

apache2ctl -t : command not found

jhsu802701's picture

The documentation says to try the commands "apache2ctl -M" and "apachectl -M". I used ssh to access my account and try these commands, but I received "command not found" error messages. So it looks like Apache isn't installed.

What do I need to do to get clean URLs to work?

Re: How do I enable clean URLs?

rpruitt625's picture

http://drupal.org/getting-started/clean-urls

You don't know what web server you're using?
I believe I'd spend some time learning about my environment if I were you.

Clean URLs now work for me

jhsu802701's picture

All I had to do was replace the .htaccess file in the public_html directory with the original one from the drupal*.zip file that I used for installing Drupal earlier on. (Source: http://drupal.org/node/258717 ) This was SO much easier than the procedures described in the URL that the error message pointed to.

The common problems related

joelwallis's picture

The common problems related to URL rewriting in custom servers (not shared and not managed) are:

  • mod_rewrite deactived
  • Permissions needing
  • AllowOverride directive disabled

It works for me

Digger's picture

Basically find out on production hosting server, .htaccess is (0k), copy original drupal .htaccess (5.8k) to production hosting server.
it works.

Be Harder, Be Smarter.

Twin Cities

Group organizers

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week