I know this has been beaten to death, put the some people get resolve, others done, and I fall into the latter category.
I have a deluxe hosting account with GoDaddy. My configuration is www.site1.com UNDER The site1 root folder I have www.site2.com Site2.com is where my drupal installation is, in the site2.com root folder. Below is my HTACCESS file, can someone please tell me what I am doing wrong since I cannot get clean URL's to work. I a running Drupal 6.12 by the way.
Thank you in advance!.
#
# 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
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 "The requested file favicon.ico was not found.
# 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_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 4, Apache 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
# 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
# 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 /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'.
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $
Comments
This looks fine. In what way
This looks fine. In what way do clean-urls fail?
Does http://www.site2.com/node give you a "404: not found" error?
Or does it work, but Drupal doesn't use clean URL in its menu links?
In the first case, do you have any custom Redirects or RewriteRules of your own in a parent directory?
In the second case, try browsing to http://www.site2.com/?q=admin/settings/clean-urls/check and also make sure that you haven't added a $conf['clean_url'] variable in the site's settings.php file.
I havent added anything to
I havent added anything to the PHP file. When I run the URL Check feature it comes back true, but I dont have the option to enable clean url's It says my server is not configured correctly. I only get a 404 page if I try removing ?=q in the URL.
I havent added anything to
I havent added anything to the PHP file. When I run the URL Check feature it comes back true, but I dont have the option to enable clean url's It says my server is not configured correctly. I only get a 404 page if I try removing ?=q in the URL.
Does it run Apache or IIS (on
Does it run Apache or IIS (on Windows)? In the second case ask them if the server supports .htaccess files at all.
The rewrite rule in the
The rewrite rule in the .htaccess appears to be correct. It could be that you don't have the .htaccess working for the second domain name if site2.com resolves to a different directory than site1.com. Contact me with the domain name and I can take a look.
If you are on a Windows machine .htaccess is not used
Been looking for days (litteraly) to solve this.
Must have uploaded over 40 versions of .htaccess file only to find out that my GoDaddy (free hosting package) server is an IIS 7 Windows machine (check by uploading a php file with in it and browsing to it)
phpinfo()If you are on a GoDaddy Windows machine too, you won't have any use with the .htaccess file since it is not being picked up by IIS.
How to get Clean URL's working on a GoDaddy Windows II7 machine.
phpinfo();in it(you need a web.config file , instead of a .htaccess file)
Damn , that took a serious chunk out of my life :)
Thanks sunchaser!
That saved me a lot of time. Much appreciated!
--jBocalig