By Mike295855 on
I have been trying to enable clean URLS on my website but I seem to have an issue whenever I run the test. When I run the test I get an internal server error. I am using 1and1 for hosting. Does anyone know what may be causing this and how I could go about fixing it?
Thanks
Comments
I'm not sure what causes it...
But I think there's just some hosts that don't support such things due to the configuration of their servers.
I'll just throw in my two cents (or pence if you're using the 1&1 .co.uk version) about my experiences here, as I have been struggling to get the new version of Drupal working on any host (5.0 and 5.1).
I have tried two hosts with Drupal 4.x and 5.x recently (Jan-Feb 2007). These are fasthosts and UK2 (I'm in the UK).
fasthosts was pretty useless and hard to use, very little help and also fairly hard to dump and get money back once I realised this. Shame, they seemed so promising to start with.
UK2, who I was using anyway for another project and tried installing Drupal on, said that they don't support Drupal on their shared servers as it would cause security issues for the other people sharing on that server. They’ll let you have the privileges on an individual server if you rent one. That might (I haven’t tried it) allow you to run Drupal, but that’s probably beyond most people’s budgets (£30-40 a month last time I checked) unless you can share an individual server with fellow Drupal users.
I got Drupal installed and ran it (to some extent) on both UK2 and fasthosts. This required deleting the .htaccess file and changing some privilege settings of the settings.php file. This is not standard installation practice as far as I know (at least for version 5.x), so I imagine Drupal won’t work properly in this state.
Clean URLs did not work on either host. And, as you have to fiddle with things just to get it to install, so it’s not exactly easy.
Looking elsewhere on this forum, some people suggested DreamHost, so I tried going with them. They have been easy to set up Drupal on.
You can set it up, just like it says on the Lullabot videocast for installing Drupal 5:
http://www.lullabot.com/videocast/installing_drupal_5
That shows how easy it is - Drupal 5.x does lots more for you than previous versions seem to have done. DreamHost also have loads of help, the forum (as mentioned a bit below), and a wiki here:
http://wiki.dreamhost.com/index.php/Main_Page
Which is so much more helpful than many other hosts are - actually providing decent self-help - it shouldn't be "wow!", but after my experiences with the others it is. The wiki is useful and says about installing Drupal 4.x (if you type Drupal into the search box).
You don’t seem to need this information for Drupal 5.x, though as it’s as easy to install as on the Lullabot videocast, where they install it on their local hard drive, but it’s also that easy to install on DreamHost. Drupal 5.x does all the stuff you (seem to have) had to do yourself before (I haven't tried installing earlier versions), like edit database stuff in settings files and so on, you just need to set up a database on the server and let the Drupal installation know what the details are.
Since DreamHost are in the US and I’m in the UK, and I had a .co.uk domain, I had to redirect the domain to them (using a control panel with the domain host, UKReg), but that was easy and DreamHost said how to do it, both in a forum and when I signed up.
A forum page that tells you how to do that is here:
http://forum.dreamhosters.com/troubleshooting/66843-.co.uk-Domain-Names.htm
If you have a domain that ICANN can register then you don’t need to do this (according to DreamHost's site). The domains they can register for you are listed here:
http://www.dreamhost.com/domains.html
If you do, though, it’s good to know how to. I'm her to tell you it's easy and don't let the extra step put you off!
The hosting’s pretty cheap compared to others in the UK, especially considering what you get. I’ll let you know by getting back here if I have any problems, but so far *touches wood*, it’s been plain sailing compared to the other two.
I started looking for UK hosts first. And maybe there are some out there that do a good job with Drupal, but I don’t think I’ll bother for the next project - these are cheaper and, so far, better.
Apologies for the huge rant, but I just thought I’d let people know my experiences. :)
Good luck, everyone!
Thanks for your response.
Thanks for your response. However, to be quite honest with you, you really have not helped me. At this moment I cannot switch host companies, therefore I have to deal with 1and1.com. I think you bring up good points, but at this time I can't take them as mentioned already.
Can anyone tell me why they think my website cannot have clearn urls?
mod_rewrite
The most likely reason you cannot get clean urls working is because your webhost has not enabled mod_rewrite for apache. I am assuming that they use apache and not IIS. Send the support department an email and ask them about their configuration. If they use apache, ask them to enable mod_rewrite for you.
Edit:
This question popped up before. It's a bit old, but see if this helps. The initial thread is here:
http://drupal.org/node/5769
A possible answer for you is here:
http://drupal.org/node/5769#comment-8827
I found this thread using this Google search.
http://www.google.com/search?q=1and1+mod_rewrite
Had the Same Problem with 1and1
I had the exact same problem with 1and1's hosting, and up until recently I didn't think it was fixable. Turns out(at least for me) it has a simple fix.
Here's what I did:
1. Access the root folder of your Drupal installation.
2. Open the ".htaccess" file for editing.
3. Scroll to the line that reads "# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly."
4. Read just below that line where it says "# RewriteBase /Drupal"
5. Modify that line to say "RewriteBase /". Notice I removed the pound symbol as well.
6. Save .htaccess and reupload it. Now try enabling Clean URLs.
I got these basic directions from another thread here on the Drupal forums a day or two ago. Hope this helps.
Thank you
Thank you to both of you. I will look into what you said. It looks very promising for my case. Once again thank you.
This worked for me with 1&1.com
I backed it up to make sure I didn't misplace it. I'll copy my file below in case it helps.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thomas the Train - Online Thomas Videos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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 $
Worked like a charm
Modding the .htaccess file worked for me. I'm also running Drupal 5 on 1and1.com. Thanks Nizy for the great info!