By jfha73 on
Can anybody tell me what I'm missing here to get Clean URLs to work?
1. php-rewrite module up and loaded
2. httpd.conf with AllowOverride All
3. .htaccess file has the following for rewrite:
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Any idea what I might be missing here?
Thanks in advance
Comments
Have you tried taking a look
Have you tried taking a look at http://drupal.org/node/15365
it has ton of configuration advises as well as links for support on various server stack programs
Yes I did check that
Yes I did check that documentation and that's what I did, but it doesn't seem to work with Apache2
apache 2 mac
I am on Apache 2 on Mac and I just noticed that mine has stopped working as well. At first I thought it was a D6 issue because I have recently moved to D6 but upon checking back on some previous D5 sites which I *know* were working, Clean URLs cannot be enabled. I'm wondering if maybe a Mac OS update changed something...
I have the same issue, only
I have the same issue, only my problem is with SuSE Linux Enterprise Server from 10 SP2 to 11 RC4 I have it configured in 10 SP2 with no problems but it doesn't want to work with 11
Make sure you really have the
Make sure you really have the module loaded in Apache. For example use a phpinfo() to see if mod_rewrite is listed under loaded modules. On Debian for example you have to call
a2enmod rewrite
to enable the module after you installed it. Also check that your virtual host for the domain doesn't override the AllowOverride value.
I checked with phpinfo and
I checked with phpinfo and rewrite module is loaded but how do I check the override? I don't have vhosts so I only have one httpd.conf and at the root of the site the .htaccess is the one from Drupal I copied before
I found it
Apache on Suse Linux Enterprise Server 11 creates two httpd.conf files, the usual one and a second one called defaul-server.conf I changed the AllowOverride on both and it works now.
Clean URL's on Suse Linux Enterprise 10.0
Hello,
I'm having the exact same problem and I have searched for the past week on these forums to try to resolve this issue with clean url's. I have the following .htaccess
# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 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
#For mod-rewrite
AllowOverride All
# Various rewrite rules.
RewriteEngine ON
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /srv/www/htdocs
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
And I have this in my "httpd.conf" file
#Turn on the mod-rewrite engine
#RewriteEngine On
RewriteEngine On
# optional cookie-based user tracking
# read the documentation before using it!!
Include /etc/apache2/mod_usertrack.conf
# configuration of server-generated directory listings
Include /etc/apache2/mod_autoindex-defaults.conf
# associate MIME types with filename extensions
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf
# set up (customizable) error responses
Include /etc/apache2/errors.conf
# global (server-wide) SSL configuration, that is not specific to
# any virtual host
Include /etc/apache2/ssl-global.conf
# forbid access to the entire filesystem by default
#
# Options None
# AllowOverride None
# Order allow, deny
# Deny from all
#
#Mod-overwrite settings start here
AllowOverride All
#Already Loads
#LoadModule rewrite_module modules/mod_rewrite.so
# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
Order allow,deny
Allow from all
# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var
### 'Main' server configuration #############################################
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# definition. These values also provide defaults for
# any containers you may define later in the file.
#
# All of these directives may appear inside containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
Include /etc/apache2/default-server.conf
# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf
### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf
# Note: instead of adding your own configuration here, consider
# adding it in your own file (/etc/apache2/httpd.conf.local)
# putting its name into APACHE_CONF_INCLUDE_FILES in
# /etc/sysconfig/apache2 -- this will make system updates
# easier :)
Help!!!!
As I remember of my
As I remember of my experience with SLES 10 was that it has this file as the default httpd.conf (/etc/apache2/default-server.conf) so configure this one instead of httpd.conf (for AllowOverride)
Also, in /etc/sysconfig there is a file called apache2 where the modules are loaded, look for the line with APACHE_MODULES and add rewrite to that list
Finally in /etc/apache2/sysconfig.d there is a file called loadmodules, here add this line:
LoadModule rewrite_module /usr/lib/apache2-prefork/mod_rewrite.so
Restart apache and type: apachectl -M to verify rewrite module is being loaded and try again to enable Clean URLs
dam dam dam
Got this when i made the changes. The last step was already done as well the second step. Then i ran the command as you said and got this
------------------------------------
intrasuse:/ # /etc/init.d/apache2 restart -M
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
rewrite_module (shared)
authz_host_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authz_groupfile_module (shared)
authn_file_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
dir_module (shared)
include_module (shared)
log_config_module (shared)
mime_module (shared)
negotiation_module (shared)
setenvif_module (shared)
status_module (shared)
userdir_module (shared)
asis_module (shared)
imagemap_module (shared)
php5_module (shared)
authz_default_module (shared)
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
rewrite_module (shared)
authz_host_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authz_groupfile_module (shared)
authn_file_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
dir_module (shared)
include_module (shared)
log_config_module (shared)
mime_module (shared)
negotiation_module (shared)
setenvif_module (shared)
status_module (shared)
userdir_module (shared)
asis_module (shared)
imagemap_module (shared)
php5_module (shared)
authz_default_module (shared)
Syntax OK
failed
-----------------------------------
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
creekspeak
Thu Apr 9 12:00:17 2009
Apache/2.2.3 (Linux/SUSE)
I see the module is loaded so
I see the module is loaded so verify your configuration, there must be something else not allowing Apache to start
Why does the Apache server
Why does the Apache server reboot without the -M trigger. I'm at the point where I may have to rebuild this server. Is there a reason you are not using Suse Enterprise Linux 10 as apposed to Suse Linux 11?
Do you by any chance offer your services for a fee? I need to have this up soon or i'm gonna have to use Sharepoint....yuck.
Fixed explanation follows
Look here for explanation
http://hexkit.blogspot.com
This is what I did for my
This is what I did for my SLES 10 server
1. Edit /etc/sysconfig/apache2 and add rewrite to the APACHE_MODULES line if it doesn't exist
2. Edit /etc/apache2/sysconfig.d/loadmodules.conf and add LoadModule rewrite_module /usr/lib/apache2-prefork/mod_rewrite.so if it doesn't exist
3. Restart apache and run apachectl -M to verify the rewrite module is loaded.
4. If rewrite is loaded, check if you can enable Clean URLs, if you can't
5. Edit /etc/apache2/default-server.conf and look for AllowOverride inside your root folder (usually /srv/www/htdocs) or the folder of your Drupal website and change none for All
6. Restart apache and check if it allows you now to enable CleanURLs
Let me know how it goes.