Hi,

We are not able to clean url, while we have enabled clean url in the control panel. It is still showing node/1, node/2 etc.

We want it should be show linke - home, aboutus, services, products etc.

We have followed the rules as per .htaccess file as under:

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.

Order allow,deny

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# PHP 4, Apache 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# PHP 5, Apache 1 and 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0

# Requires mod_expires to be enabled.

# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1

# Various rewrite rules.

RewriteEngine on

# If your site can be accessed both with and without the prefix www. you
# can use one of the following settings to force user to use only one option:
#
# If you want the site to be accessed WITH the www. only, adapt and
# uncomment the following:
#RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
#RewriteRule .* http://www.example.com/ [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. prefix, adapt
# and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule .* http://example.com/ [L,R=301]

# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /

# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]

# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]

# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# $Id: .htaccess,v 1.81 2007/01/09 09:27:10 dries Exp $

Comments

kulfi’s picture

Clean urls changes q=node to node. Path changes node/1 to aboutus or whatever alias you provide.

webexperts’s picture

But right now it is not changing node/1 to node/aboutus
we are using the same .htaccess on same server in subfolder it works fine
rewritebase /drupal
but not working on
rewritebase /

Thanks

csc4’s picture

node/1 to node/aboutus is a MODULE function not a rewrite - see Pathauto module

kulfi’s picture

Did your clean URLs test fail? If not, you shouldn't need to edit your .htaccess file. Also, enabling the path module allows you to provide aliases for your nodes. If you provide 'aboutus' as an alias, it is accessible at http://yoursite.com/aboutus; if you provide 'node/aboutus', it is accessible at http://yoursite/node/aboutus'. See http://drupal.org/handbook/modules/path

AutoInsurance Guy’s picture

If you want the title of your page to be automatically used as the URL name (example - yoursite.com/this-page-title ), then install the pathauto module. You can customize how your URLs will automatically be generated.

If on the other hand, you only have a handfull of pages which you don't mind naming yourself, you can just go to the URL PATH options underneath your post (when creating a page), and type in the page URL you're wanting that page to be accessable with.