Forum Moderators: phranque
example: sub1.mydomain.com , sub2.mydomain.com and sub3.mydomain.com will throw me a internal server error.
If I cancel out/eliminate the .htaccess then accessing the subdomain is fine. So this tells me it's something with the root .htaccess
Is there something to add to the .htaccess file so the subdomains will work properly? Or wont be affected from the .htaccess in the root? Here is my current .htaccess which is causing the problems.
# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On
# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /
#RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
#RewriteRule (.*) [yourdomain.com...] [L,R=301]
RewriteRule ^((urllist¦sitemap_).*\.(xml¦txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_URI} !(admincp/¦modcp/¦chat¦cron)
RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !\.(jpg¦gif)$
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp¦modcp¦clientscript¦cpstyles¦images)/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 71.127.175.185
deny from 61.91.204.18
deny from 71.164.83.174
deny from 99.145.229.110
deny from 68.94.88.9
deny from 68.41.229.73
deny from 124.168.112.108
deny from 75.126.219.188
deny from 69.137.196.78
deny from 24.45.163.60
deny from 69.254.61.197
deny from 69.119.247.78
deny from 67.19.225.114
deny from 69.183.41.196
deny from 70.245.22.22
deny from 70.243.161.154
deny from 70.245.22.22
Also check your server access log for entries corresponding to the same requests logged in the error log.
General advice, look for recursion -- Rewritten URLs being rewritten again and again. This is a common problem. Your last two rules may be susceptible to this problem, since vbseo.php is not explicitly excluded from being rewritten. (I can't be sure, because I don't know your URL- and directory- architecture.)
Jim
public_html/ (this is the root, where the .htaccess is
public_html/foobar/ - also accessible www.foobar.com or foobar.example.com this results in a 500
public_html/quux/ - also accessible www.quux.ws or quux.example.com this results in a 500
This is the directory architecture you spoke of, could i solve this problem by simply adding a blank .htaccess file into these messed up sub-domain directories? Thanks in advanced.
[edited by: AlexPoucher at 8:12 pm (utc) on Feb. 27, 2008]
[edited by: jdMorgan at 1:41 am (utc) on Feb. 28, 2008]
[edit reason] example.com. Pleas see Terms of Service. [/edit]