.htaccess? - main page- gives 'Server Error'
sjames - February 23, 2006 - 04:58
I'm getting an internal Server Error when I tried to access http://www.shreemaa.org/drupal
when I move the drupal .htaccess file aside, everything works.
I've looked in the htaccess file and can't isolate the problem.
anyone have ideas to fix the drupal htaccess so I can see my site?
thanks.
susan

Places to start
I don't know the answer off the top of my head but this is how I would try to fix it: replace the file from an archive, download it from Drupal (same version and reupload it). If that does not solve the problem, I'd have to ask, did it ever work? if not, it might be best not to use them or try a diffrent host or are there two htaccess files? check the permissions on the directory...
Best.
"You can always find the storm by listening for the Thunder."
I used the htaccess dist version
this was working.
I just tried the htaccess dist version that comes with the software.
and, that also doesn't work.
yet, I can move the htaccess aside and can see my site.
http://www.shreemaa.org/drupal
see below what I have in the file:
I don't know is wrong.
I'm going one by one and commenting out, and meanwhile my site is down.
======================
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order deny,allow
Deny from all
# Set some options.
Options -Indexes
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More exist in sites/default/settings.php, but
# the following cannot be changed at runtime. The first IfModule is
# for Apache 1.3, the second for Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# Reduce the time dynamically generated pages are cache-able.
ExpiresByType text/html A1
# Various rewrite rules.
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /drupal
# 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]
It works for me after few tweaks
It didn't work for me, either.
First, I am assuming that you are using Apache (I don't know anything about IIS).
Usually, even on a shared host, you have access to Apache logs (for example, cpanel calls it Error log. You can look what was it that the server didn't like. For me, it was most of .htaccess file, except for rewrite rules (I think, it didn't mind php_values, either - but *I* didn't like to have them in .htaccess).
So, what I would do - leave Options and Rewrite directives; and delete (or comment out) everything else. It worked for me. Then, if you are adventurous - you can add lines one by one. Or, if you have access to Apache logs - see what are the offensive lines (and if you don't - you should change the host :)
here's what worked- Drupal .htaccess
http://www.shreemaa.org/drupal now works.
after laboriously removing and adding back lines, here's my entire .htaccess file ( so that someone else doesn't have to spin cycles):
I'm not really sure if this drupal .htaccess is necessary. why can we not just use httpd.conf for all our directives and php.ini for php directives???
============================
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order deny,allow
Deny from all
# Set some options.
#Options -Indexes
#Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
#DirectoryIndex index.php
# Override PHP settings. More exist in sites/default/settings.php, but
# the following cannot be changed at runtime. The first IfModule is
# for Apache 1.3, the second for Apache 2.
#
# php_value magic_quotes_gpc 0
# php_value register_globals 0
# php_value session.auto_start 0
#
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
####php_value memory_limit 12
# Reduce the time dynamically generated pages are cache-able.
#
# ExpiresByType text/html A1
#
# Various rewrite rules.
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /drupal
RewriteBase /drupal
# 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]
##RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
.htaccess vs httpd.conf
>I'm not really sure if this drupal .htaccess is necessary. why can we not just use httpd.conf for all our directives and php.ini for php directives???
I guess, because many people (including myself) run drupal on shared servers and don't access to httpd.conf and php.ini
Also, I would argue that it's better to have rewrite rules in .htaccess even if you have access to httpd.conf. First, you don't have to restart apache when you make changes; second, you don't clutter httpd.conf if you have many different rewrite rules for different directories; and third, it is conceivable to control rewrite rules by reading/overwriting .htaccess from the system settings for those of us who beleived apache documentation when it said that mod_rewrite is woodoo :)
It's fixed for me
I had exactly the same problem. I have 3 sites on my server and 2worked fine, but when i installed the third it crushed. Fortunately i have access on the httpd.conf file on my server.
If you find something like AllowOverride AuthConfig try to change it to AllowOverride All
It worked fo me.
Good luck.
This works for me....
Comment out the line
# Options +FollowSymLinks
Hth,
Robbert van der Hoorn
I've the same problem on Aruba.it server
Hi to all
I've use this .htaccess code
#
# Apache/PHP/site settings:
#
# Protect files and directories from prying eyes:
<Files ~ "(\.(conf|inc|module|pl|sh|sql|theme|engine|xtmpl)|Entries|Repositories|Root|scripts|updates)$">
Order deny,allow
Deny from all
</Files>
# Set some options
# non supportato da aruba
#Options -Indexes</strong>
# non supportato da aruba
#Options +FollowSymLinks</strong>
# Customized server error messages:
ErrorDocument 404 /index.php
# Set the default handler to index.php:
# non supportato da aruba
# DirectoryIndex index.php
# Overload PHP variables:
<IfModule mod_php4.c>
# If you are using Apache 2, you have to use <IfModule sapi_apache2.c>
# instead of <IfModule mod_php4.c>.
php_value register_globals 0
php_value track_vars 1
php_value short_open_tag 1
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value magic_quotes_sybase 0
php_value arg_separator.output "&"
php_value session.cache_expire 200000
php_value session.gc_maxlifetime 200000
php_value session.cookie_lifetime 2000000
php_value session.auto_start 0
php_value session.save_handler user
php_value session.cache_limiter none
php_value allow_call_time_pass_reference On
</IfModule>
# Various rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and the
# rewrite rules are not working properly:
RewriteBase /drupal51
# 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 URLs of the form 'index.php?q=x':
RewriteCond %{REQUEST_URI} "!cgi-bin/"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# $Id: .htaccess,v 1.58 2004/10/09 20:41:49 dries Exp $
But I can't see every file in the "files" folder!!!
I've my temporany drupal website under http://www.mywebsite.com/drupal51 folder. Well I can't understand, Why I can't see a pictures that I upload in this "files" folder?
If i try to keep this pictures directly I can't see it too. let's see here
http://www.walterfantauzzi.com/drupal51/files/_low_S_walter.jpg