Forum Moderators: phranque

Message Too Old, No Replies

Includes not working in add-on domain

but they work for main domains

         

Lorel

6:28 pm on Oct 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I set up an add-on domain under my main domain but the htaccess file won't load the includes on this new domain (It works on over 50 other sites I've set up but I'm unfamiliar with add-on domain set up). The host indicates the domain is in the right folder but the htaccess won't fix the canonical or anything else. The host won't give support for htaccess so I'm wondering if there is something else I need to do to get htaccess to work.

Here is what I have in the htaccess file so far:

AddHandler server-parsed .html

Options +FollowSymLinks +Includes
RewriteEngine on

lucy24

9:33 pm on Oct 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you start with giving idiot-level explanations of two things? htaccess is not a good place for diagnosing by best-guess ;)

#1 Is it a wholly separate domain name, or a subdomain?

#2 What is the actual directory structure? One likely configuration is userspace (identified by your name) containing one or more domains and possibly also your log files. But there are other possibilities.

A quick-and-dirty way to localize htaccess problems is to pepper your directories with htaccess files saying variously "Options +Indexes" or "Options -Indexes". This gives you your starting information: are the assorted htaccess files being recognized at all?

Lorel

11:05 pm on Oct 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It is an add-on domain - a totally separate domain from my main one - not a sub domain but under the same hosting account as my main one.

it's in /var/www/domain/

where my main domain is in /var/www/html/domain/

my htaccess files in over 50 other sites work fine but none of them are add-on domains.

lucy24

2:43 am on Nov 1, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



:: detour to make sure "add-on domain" doesn't have some arcane technical meaning that I've overlooked ::

it's in /var/www/domain/

where my main domain is in /var/www/html/domain/

Uh-oh. That doesn't sound right. They should be exactly parallel. Did you put it there, or did your host? Is the DNS up and running and pointing to the right place? In a way this question is independent of htaccess, which mainly deals in physical locations, but don't start wrangling with the htaccess until you're positive the real stuff is where it's supposed to be.

Try the Indexes game and see what you get. Yes, you can make up fake directories and populate them with foobars and widgets for the purpose ;) Do you have the code that tests which apache mods are available? (I'm assuming the host won't say upfront: they tend to be coy about details.) Run that in another fake directory.

Lorel

8:46 am on Nov 3, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes the host put it there after I made sure they understood I wanted the domain totally separate from my main domain.

Yes, the DNS is working and also the redirect from the Old folder in my main domain to the new domain is working. The only thing that isn't working in the includes.

I have no idea what you're talking about in your last paragraph.

lucy24

6:22 pm on Nov 3, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oops, backtrack. When you said "includes" I assumed you meant the Apache includes-- all those essential mods that run along with the core. Did you mean includes like php files that are supposed to attach themselves to every page? If so, the question may really be a variant of the standard Rewrite problem-- the one where all your graphics and css disappear because the browser thinks they're somewhere other than where they really are.

Where are the includes located and how do the new-domain pages call them? Are you using the same files for both domains?

Lorel

7:13 pm on Nov 3, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's working now. I called tech support and got someone who knew what they were doing this time. The http config file (which I don't have access to) needed to be set to parse includes.

Thanks for trying to help.