Forum Moderators: phranque
This is some old issue with west host i guess its looping the account domain , am very disturbed i just transfered my website to them
this is what am getting in my logs
Location
[My.com...]
Referrer
[My.com...]
Message
www.My.com//www.My.com/taxonomy/term/index.php/0/forum not found.
for which i am seeing logs
--------------------
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine¦inc¦install¦module¦sh¦.*sql¦theme¦tpl(\.php)?¦xtmpl)¦code-style\.pl¦Entries.*¦Repository¦Root¦Tag¦Template)$">
Order deny,allow
Deny from all
</FilesMatch>
# 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 in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>
# PHP 4, Apache 2
<IfModule sapi_apache2.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>
# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
</IfModule>
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# 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
</IfModule>
# Various rewrite rules.
<IfModule mod_rewrite.c>
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}!^www\.my\.com$ [NC]
RewriteRule .* [my.com...] [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
# RewriteCond %{HTTP_HOST}!^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 /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]
</IfModule>
# $Id: .htaccess,v 1.73.2.2 2007/01/26 00:09:37 killes Exp $
--------------------
The folder structure and hosting of the domains is as follows
public_html
---Domain2 folder
---Add on domains
in public_html i have drupal installation for my main domain
in folder Domain2 i have drupal installation for first add on domians and its htaccess is similar to above
in folder Add on domains i have sub folders where i have two other folders and my other two domains are hosted
those two add on domains dont have htaccess files
In the folder public_html i have robots file in which i have denied access to
/domain2/
/addon domains folder/
so that when crawler comes to crawl main website it should not go to my add on domain folders
-------------------
one more thing i have noticed
If i get 404 error in any of my add on domains it redirects to my main domain
why its so?
i guess its due to
# Customized error messages.
ErrorDocument 404 /index.php
in the above htaccess but why its working for add on domains too?
-------------------
i have one dedicated ip for the hosting where all these are hosted
thanks for your time
# If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule .* http://www.example.com/ [L,R=301]
what was intended was probably:
# If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule [b](.*)[/b] http://www.example.com[b]/$1[/b] [R=301,L]
# If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
RewriteCond $1 !^(addonsubdir1¦addonsubdir2¦addonsubdir3¦addonsubdir4)
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
With the combination of unknown httpd.conf settings, bad Drupal-generated code, and unknown method of creation of "add-ons," that's all I can come up with.
Your best bet may be to contact WH and Drupal, and ask them for help.
Change all broken pipe "¦" characters in the code above to solid pipe characters before use; Posting on this forum modifies the pipe characters.
Jim