liamC
Member
Registered: 28th Feb 04
User status: Offline
|
On my web hosting control panel I have set the permissions of folders to 711 so people can't look through the different folders on my server, but I was just wondering if it is possible to create a webpage saying "you do not have access to this page, please visit the homepage" or if the person types in the wrong address, it comes up saying "this page doesn't exist" blah blah
Anyone any idea how I can do this?
|
AndyKent
Member
Registered: 3rd Sep 05
User status: Offline
|
Some hosts will let you specify custom error pages, so rather than forward you to a 404 (not found) or whatever the code is for permission denied, the user would get sent to a custom page.
|
drax
Member
Registered: 5th Feb 05
Location: Sittingbourne, Kent
User status: Offline
|
Look up editing the HTACCESS file for custom 404
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Online
|
Should be 700 if you want no access.
711 is execute access for group and public.
If you want a nicer message, make it 644 and put an index.htm in there. You still need 644 on the images as well, which means they'll work if you know the filenames but you can't browse the folder.
Still not secure as such as if someone knows the name they can get the pics. If you want to authenticate users properly then you need htaccess.
Also that error code will but 401 I think not 404 if you've not authorised the read. The 404 might be the error page not available.
Either way, those errors are usually ugly. Default document (index.htm) in there usually does the trick.
|