PDA

View Full Version : htaccess and subdomain


Spiderman
04-01-2008, 04:31 PM
Hi,

I have two copies of phpLD. I installed one on the root domain (domain.com) and the other on a subdomain on that same domain (abc.domain.com).

But when I visit abc.domain.com the page doesn't load. Is that because the htaccess (from the root directory) is blocking the subdomain? And if yes, what should I change in my root htaccess to allow abc.domain.com? I use phpLD 3.3 and I haven't made changes to the htaccess.

Thanks in advance.

James
04-01-2008, 05:37 PM
Shouldnt be. I assume you have 2 licenses as that is 2 installs.

Anyway care to pm me the url and I will most likely need ftp access to see what is going on

Spiderman
04-01-2008, 09:07 PM
Yes I have 2 licenses/copies of course...

...I got a reply from my hosting:

"I found your subdomain had not been added to DNS and it's resolving now. You can disable your htaccess by renaming it if you suspect it's causing trouble."

As DNS has resolved I tried again and this time I had a 403 error.

Note that I still haven't installed the phpLD script on the subdomain - so I only have a sample index.html page. The phpLD htaccess file is at /public_html and subdomain is at /public_html/abc.

Anyway, in the phpLD htaccess I found the following:

Content visible to registered users only....so, I changed extension of the sample file from index.html to index.php and it worked. So, when I install the phpLD script on the subdomain everything should work fine, because default file is index.php.

But I plan to add more subdomains, which will run custom scripts other than phpLD. And since on the root domain (domain.com) I have the phpLD htaccess, do you think that this htaccess will cause problems with my other custom scripts that will run on subdomains (like /public_html/abc)? My custom scripts have a index.php too.

For example if I have phpLD on domain.com (/public_html folder) and then install wordpress at blog.domain.com (/public_html/blog folder), do you think the phpLD htaccess file from /public_html folder will cause trouble to blog.domain.com (403, 500 or 404 errors)?

Thanks

James
04-01-2008, 11:46 PM
Well it shouldnt AT all since the way the server is supposed to treat it... it is suppsoed to be treated as a unique domain .. but since apparently it isnt even added to the dns there may be server config problems etc.. You can remove the
DirectoryIndex index.php

if you wish