I have a strange redirect if I access my Drupal installation without subdomain:


leads to


and the "drupal7" is just wrong.... If I enter


directly, everything works fine. I already asked my webspace provider for support, but these settings are completly fine. The Drupal installation was installed intially with an other domain. May this change cause this problem? And how can I fix this?

Thanks a lot! Saduras

Edit: I found some entries in the database table prefix_locales_source which has "/drupal7/install.php?profile=standard&locale=de" in the field 'location'. Are these somehow related to my problem?

  • Did you check your A record for efg-zoar.de where is it pointing to? Did you change the .htaccess file at all?
    – 15dk51
    Commented May 2, 2013 at 16:54
  • The whole webspace is managed by Domainfactory and I can't set any IP configurations or A records. I just specified an path on the webspace for the domain and it's not possible to set a different path for the subdomain www (but for any other and they work perfect as well)
    – Saduras
    Commented May 2, 2013 at 21:26

2 Answers 2


When I acccess the URL http://efg-zoar.de/ in Firefox with the HttpFox extension installed, it shows this response header.

(Status-Line)   HTTP/1.1 301 Moved Permanently
Date    Thu, 02 May 2013 21:45:41 GMT
Server  Apache/2.2.22
Location    http://www.efg-zoar.de/drupal7/

This shows that you have Apache installed, and something is performing a server-side redirect. As an earlier post mentioned, this redirect might take place at different levels.

The web browser hits Apache first. Apache can store redirects in both the httpd.conf and .htaccess files. It sounds like you're hosting in a shared environment, so my bet would be the .htaccess file.

Apache then passes the request to PHP and Drupal. A four-line PHP file can perform the same redirect, as shown here. http://www.cyberciti.biz/faq/php-redirect/

I checked the headers when accessing the home page with the WWW prefix http://www.efg-zoar.de/. This shows the header X-Powered-By: PHP/5.3.10. This makes me suspect that http://efg-zoar.de/ is hitting plain Apache with no PHP or Drupal involved. Here's the header from http://www.efg-zoar.de/.

(Status-Line)   HTTP/1.1 200 OK
Date    Thu, 02 May 2013 22:02:30 GMT
Server  Apache/2.2.22
X-Powered-By    PHP/5.3.10
X-Generator Drupal 7 (http://drupal.org)

You should contact your web host and ask them how to change the Apache redirect in either the .htaccess or httpd.conf file. Sometimes web hosts allow you to FTP the .htaccess file, but you need to configure your FTP client to show hidden files (file names preceded by a period, like .htaccess).

Here's the HttpFox extension for Firefox. It's helpful for debugging these issue. https://addons.mozilla.org/En-us/firefox/addon/httpfox/

  • Thanks, I found the problem. A wrong .htaccess file (for joomla) caused this one.
    – Saduras
    Commented May 3, 2013 at 9:40

i think you have this:

www.domain.de in /bla/bla/drupal7

domain.de in /bla/bla/drupal7

you need:

www.domain.de in /bla/bla

domain.de in /bla/bla

redirect folder /bla/bla via .htaccess or php to /bla/bla/drupal7

  • I tried something like this with an html-meta redirect. It work's indeed, but then I have the ugly URL www.efg-zoar.de/drupal7 as base url. I would like to get rid of the "drupal7" instead...
    – Saduras
    Commented May 2, 2013 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.