Hi!

I did all install steps for subdomain on my site www.somvprahe.sk.
In subdomain settins I have everything ok except Web server - not working yet

but when I try go to testing url:
http://subdomain-test.somvprahe.sk/subdomain/test
it works fine
pathauto with token [subdomain] working fine, e.g. it did
http://sport2-pokus.somvprahe.sk when sport2-pokus is og title

the problem is that after submitting new og, new subdomain url is not targeting to og node.
looks here: http://sport2-pokus.somvprahe.sk

Webserver in subdomain settings wrote:

HTTP request to http://subdomain-test.somvprahe.sk/subdomain/test returned the following result:

HTTP_HOST:	subdomain-test.somvprahe.sk
QUERY_STRING:	subdomain/test
REQUEST_URI:	subdomain/test
SCRIPT_FILENAME:	/srv/web/sites/somvprahe.sk/web/www/index.php
The REQUEST_URI should have been rewritten as '~subdomain-test/subdomain/test'.

Your web server is not rewriting your URLs correctly.

Possible solutions:

    * Confirm that you correctly patched your .htaccess file, if you're using Apache, or setup the appropriate URL rewrite rules in your web server configuration file if you're using a web server other than Apache
    * Read through Readme.txt and make sure you've completed all the installation steps correctly

I am using drupal 5.10, sudomain 5.1.4

I attached my .htaccess file if it can be help for you
thanks for your help
Igorik
http://www.somvprahe.sk

CommentFileSizeAuthor
htaccess.txt6.27 KBigorik

Comments

igorik’s picture

I am sorry I had to disable subdomain module because login form then doesn't works. (I thought that clear cache helps but I found that it doesn't)

FYI:
this url http://subdomain-test.somvprahe.sk/subdomain/test works for always and it returns:
SUBDOMAIN TEST subdomain-test.somvprahe.sk subdomain/test subdomain/test /srv/web/sites/somvprahe.sk/web/www/index.php

this url: sport2-pokus.somvprahe.sk showed content of index page of www.somvprahe.sk,
when I disable subdomain, new url is http://www.somvprahe.sk/~sport2-pokus
(pathauto node settigs for og was set as only [subdomain])

Please let me know if I can help to you with this bug
I tried to create some testing web when I enable it.

thanks
Igorik
http://www.somvprahe.sk

setvik’s picture

You need to patch your .htaccess file

Insert:

  # REQUIRED BY SUBDOMAIN.MODULE
  # Moves subdomain to URI path
  # e.g: mysubdomain.example.com 
  # becomes example.com/index.php?_mysubdomain/
  # NOTE: does not rewrite subdomain if it is "www". 
  # If you want it to rewrite www, disable the 2nd line
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{HTTP_HOST} !^www\.([^.]+)\.([^.]+)$
  RewriteCond %{HTTP_HOST} ^([^.]+)\.([^.]+)\.([^.]+)$
  RewriteRule ^(.*)$ index.php?q=~%1/$1 [L,QSA]

Directly above the following code near the bottom:

  # 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]
</IfModule>
setvik’s picture

Status: Active » Postponed (maintainer needs more info)
igorik’s picture

Status: Postponed (maintainer needs more info) » Fixed

Thanks, now it works.

can you please tell what was the problem?

Thanks again
igorik

setvik’s picture

You needed to patch your .htaccess file.

The code you added:

  # REQUIRED BY SUBDOMAIN.MODULE
  # Moves subdomain to URI path
  # e.g: mysubdomain.example.com
  # becomes example.com/index.php?_mysubdomain/
  # NOTE: does not rewrite subdomain if it is "www".
  # If you want it to rewrite www, disable the 2nd line
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{HTTP_HOST} !^www\.([^.]+)\.([^.]+)$
  RewriteCond %{HTTP_HOST} ^([^.]+)\.([^.]+)\.([^.]+)$
  RewriteRule ^(.*)$ index.php?q=~%1/$1 [L,QSA]

tells your web server to take the subdomain and stick it onto the front of the path so that Drupal can see and correctly intrepret it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.