PDA

View Full Version : mydomain.com to subdomain issue



lawrencejamerson
12-19-2009, 05:19 PM
Hi,

The site is www.planethypnosis.com and I put the files in a subfolder: planethypnosis. Now I cannot access the page directly.

I changed the .htaccess file and it now reads:



# Use PHP5 as default
AddHandler application/x-httpd-php5 .php

# Change yourdomain.com to be your main domain.

RewriteCond %{HTTP_HOST} ^(www.)?planethypnosis.com$

RewriteCond %{REQUEST_URI} !^/planethypnosis/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /planethypnosis/$1

RewriteCond %{HTTP_HOST} ^(www.)?planethypnosis.com$
RewriteRule ^(/)?$ planethypnosis/index.html [L]


Options All -Indexes


This was all taken from other posts and the knowledgebase. Yet when I try to access www.planethypnosis.com I get a 405 permission denied page. To get it to work I have to type http://www.planethypnosis.com/planethypnosis/index.html

All the files have permissions of 644 and the folders 755

I am pretty sure this worked before and I have changed nothing. I have read all the posts related to this and can't find a problem. Can anyone see what the problem is?

Thanks in advance for any advise.

lawrencejamerson
12-22-2009, 12:29 PM
PS It is a 403 permission denied, not a 405.

Anyone have any suggestions? I really have scoured the forums and can't find a definitive answer. It seems like a common problem though.

Thanks

lawrencejamerson
12-23-2009, 01:00 PM
Sometimes sleeping on it is the best solution... Now it works.

In case it helps other people in the future, I inadvertently missed on the 'rewriteengine on' line, as in the following help article:

http://helpdesk.bluehost.com/index.php/kb/article/000347

farcaster
12-23-2009, 02:07 PM
Thanks for coming back and posting the solution.

Many people don't do that and then the knowledge doesn't get shared. Or a year down the road someone dredges up the thread and posts to it with a "me, too" or "did you find the problem".