Error 403/Forbidden

mozsumo

New Member
Messages
20
Reaction score
0
Points
0
I registered a subdomain of my co.cc TLD yesterday and whenever i tried to go to it, it gave me a 403 error (Forbidden). I chmod'ed everthing to 777 (all-access) and it didn't work. I then deleted the subdomain and remade it. The same thing is still happening. Please help me.

Thanks.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Does the subdomain folder contain an index file, as specified by the DirectoryIndex directive? Can you access the subdomain folder via the main domain?
 

mozsumo

New Member
Messages
20
Reaction score
0
Points
0
there is an index.html file in the folder
Edit:
Now, i am just getting the directory of files/folders in the subdomain root folder. There is an index.html file in the list.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
In the subdomain folder, find or create a file named .htaccess

Add or make sure you have the two lines:

Code:
Options All -Indexes

DirectoryIndex  index.html

The first prevents the listing of the contents.
The second tells Apache to serve up index.html as the default page. You can add more names

Code:
DirectoryIndex  index.html  index.php  default.html home.php

and Apache (the webserver) will pick the first match as the default page.

Edit:

also Index.html is not the same as index.html

Capitalization matters on *nix computers.

Why this happened:
You probably have a .htaccess file in your root directory that sets the default page to index.php or something similar. The subdirectory inherits that directive. Putting a .htaccess file in the subdirectory overrides that.
 
Last edited:

mozsumo

New Member
Messages
20
Reaction score
0
Points
0
thanks. I didn't even think of htaccess. And I know, apache is annoying - capitalization counts
 
Top